OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Taggart on 03 Mar 2004, 19:38:00

Title: Time Limit
Post by: Taggart on 03 Mar 2004, 19:38:00
I have searched but cannot find any reference to the subject. I am making a Clan Match Mission and wish to limit the amount of time available. How do you make the option appear in the page where you choose which soldier's place you want to play?  ???  Anything from 30 minutes to two hours duration. Have checked out Chris' Briefing Wizard but can see no input there.

Help as always greatly appreciated.  ;D
Title: Re:Time Limit
Post by: Kaliyuga on 03 Mar 2004, 20:04:49
 I'm not too sure if you can make it happen from the unit selection screen like when you play CTF or DM or whatever.

but you could have a dialogue come up once the mission started that was linked to some triggers that began a countdown to mission ending..

you just make several endgame triggers with varying countdown times on them and then have them activated by whatever the host chooses.

As this is more of a MP question I'm moving it to that board though

:cheers:
Title: Re:Time Limit
Post by: Taggart on 03 Mar 2004, 21:10:48
Thanks, but not quite what I was asking. I have seen several missions where it possible before the mission begins to change the duration of the mission to be played. Is there an input for the description.ext, the same as you would use for displaying the compass, watch or GPS, that can be added so as to display a timer option  :-\

Thanks for your support in advance.  :)
Title: Re:Time Limit
Post by: myke13021 on 04 Mar 2004, 01:18:01
If i understand you correct, you mean the basic part where you set the max time and score. As you guessed this goes into the description.ext
The code looks as the following:

titleParam1 = "Time:";
valuesParam1[] = {100000, 300, 600, 900, 1200, 1500, 1800, 2700, 3600, 7200};
defValueParam1 = 1800;
textsParam1[] = {"Unlimited", "5 min", "10 min", "15 min", "20 min", "25 min", "30 min", "45 min", "1 hour", "2 hours"};

titleParam2 = "Score to win:";
valuesParam2[] = {10000, 5, 7, 10, 15, 20, 25, 30};
defValueParam2 = 5;
textsParam2[] = {"Unlimited", 5, 7, 10, 15, 20, 25, 30};

To end the game just make a trigger with the following in it's condition field:

time >= param1

You might also make a timer script which is, as i heard, a little more accurate than the "time" command. But in general it should be accurate enough  ;D
Title: Re:Time Limit
Post by: Taggart on 04 Mar 2004, 03:10:15
Thanks all for the help, as usual.  :)