OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: CAS_Daniel on 22 Nov 2005, 21:37:23
-
Hi, I want to add the ability to change the time at the assign screen to my mission. I know where to do this - I opened a capture the flag mission and found it in the description file and the string table, but I don't understand how it works. Is there a simple way of doing this? Thanks, Daniel. :)
-
The way it works is you have your time in the PARAMS thing on your description.ext, I assume you know how to do this because I don't remember how ;)
Anyway, in the mission you set the time to 00:00. And in your init.sqs you put:
skipTime params1
Assuming that params1 is your "Select time" thing. So in the value-field of your params you write the number of hours to skip ahead from 00:00, and et voilá you've got changable time.
-
DESCRIPTION.EXT
titleParam1 = "Time of Day";
valuesParam1[] = {5,12,18.3,0};
defValueParam1 = 5;
textsParam1[] = {"First Light","Midday","Last Light","Night"};
INIT.SQS
Skiptime param1
MISSION EDITOR
set the mission start time to midnight, 00:00hrs
if you decide to use another mission start time, then you will need to amend the param1 values
-
Thanks a lot guys, I think I get it now. :D
I'll lock this thread once I've tested it. :)
EDIT: Works like a dream, thanks a lot! ;D