OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: LeeHunt on 05 Aug 2007, 01:03:18

Title: SOLVED: What time is it? (in the game that is)
Post by: LeeHunt on 05 Aug 2007, 01:03:18
couldn't find the answer to this searching ofpec or on the Bohemia wikipedia...

How do I find out what time it is during the mission from the editing point of view?

I'd like to, if possible, have a finale cutscene where the time is the sunset at like 6:30 pm.  But the player could finish the mission in the middle of the night. Does anyone know how i can get a number for the actual time and then use with skiptime?

thanks so much!

ps looking forward to the Beta test marathon!
Title: Re: What time is it? (in the game that is)
Post by: myke13021 on 05 Aug 2007, 01:14:19
The command daytime (http://community.bistudio.com/wiki/daytime) could be what you're looking for, mate.  :D
Title: Re: What time is it? (in the game that is)
Post by: firecontrol on 05 Aug 2007, 07:23:54
Code: [Select]
skipTime ((2.8800 - daytime) + 24) % 24;

Works by taking the time you want, subtract the current time... add 24 hours to account for a negative number, and apply a mod 24. (The remainder of the number divided by 24.) Will give the positive difference in hours needed to "skip" to get to the target time.

This will set the time of day to whatever you want. 2.88 is about 2:53AM... change as needed. :)
for 6:30PM use 18.50, so on and so forth.
Title: Re: What time is it? (in the game that is)
Post by: Tyger on 05 Aug 2007, 07:38:05
ps looking forward to the Beta test marathon!

Glad to hear it mate! We look forward to seeing your posts!
Title: SOLVED: What time is it? (in the game that is)
Post by: LeeHunt on 05 Aug 2007, 16:10:49
great! thanks gentlemen that worked perfectly!