Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

time of day - like dusk,dawn,day,night with lua

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> time of day - like dusk,dawn,day,night with lua Page: [1]
Login
Message << Older Topic   Newer Topic >>
time of day - like dusk,dawn,day,night with lua - 10/23/2019 2:29:28 AM   
Whicker

 

Posts: 644
Joined: 6/20/2018
Status: offline
is it possible to get the time of day with Lua? I haven't seen anything so I assume not. It would have to be relative to a unit or location as obviously it changes, but if I could get the time of day then I could use lua to make a penalty for flying at night. Maybe something else but primarily I am trying to come up with an easy way to penalize a player for flying at night. Other than figuring out roughly what time it is that it gets dark and using that - as that varies by timezone/location too much.
Post #: 1
RE: time of day - like dusk,dawn,day,night with lua - 10/23/2019 4:37:01 AM   
apache85

 

Posts: 1631
Joined: 12/18/2014
From: Melbourne, Australia
Status: offline
Not at current but it sounds like a nice thing to have.

I used something along the lines of what you're suggesting to restrict the Cubans to day-only ops in Seven Days in October. Generally a scenario isn't going to be multiple time zones so I think I used 0600 as dawn and 1800 as dusk to restrict the Cuban air ops, it worked pretty well for a scenario that covered a reasonably large geographical area.

_____________________________


(in reply to Whicker)
Post #: 2
RE: time of day - like dusk,dawn,day,night with lua - 10/23/2019 5:55:45 AM   
Whicker

 

Posts: 644
Joined: 6/20/2018
Status: offline
yep - more or less doing that for the AI side, not too bad. But for the player side it is harder to do. I am checking time and then any planes on the ground get their ready time changed - and any planes in the air get put into a table to evaluate later to force some to crash. If the time of day was available it would be much simpler and would work better for penalizing the player side.

I'm also making it cloudy at night so there is nothing to find anyways - as it is a WW II attempt and all anyone has is binoculars. But I want the players planes to crash a percent of the time if they are airborne after dark - a lot of them are carrier based so it would be a bit dangerous to land at night I would think.

My location also straddles a time zone which is a bit of a pain.

(in reply to apache85)
Post #: 3
RE: time of day - like dusk,dawn,day,night with lua - 10/23/2019 7:59:28 AM   
michaelm75au


Posts: 12530
Joined: 5/5/2001
From: Sydney, Australia
Status: offline
I'll add it to my list of things to look into.

_____________________________

Michael

(in reply to Whicker)
Post #: 4
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> time of day - like dusk,dawn,day,night with lua Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.180