OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: ZIKAN on 25 Mar 2003, 19:06:11
-
Basicly how would I stage a particular event using triggers to happen at a certain time? I want a group of units to move @ a paticular time.
Say for example, Two squadrons of tanks will move @ 0800hrs....how would I get this to work using triggers?
Thanks.
-
As always, use switch triggers to contro the movement of a group through its series of waypoints. You can of course synchro waypoints if you want two or more groups to act together.
As for time, the best way is probably to time it from the start of the mission. Say your mission starts at 07:45 and you want the tanks to move off at 08:00. Create a trigger and synchro it with the first waypoint of the tanks
Countdown: 900 900 900
type: switch
condition: true
You'll have to experiment a little with the timings as OFP seconds are not necessarily exactly the same as real world seconds. ;D
-
/me *cough*
Now what macguba there said is fine and works for 99% of missions and is easy to use and all that stuff
BUT
If you happen to have say a parameter which let's the player to decide the starting time of the mission or just want to be cool and do stuff the hard way( ;D) you'd
create waypoints for your group and in the first one's condition field type
daytime >= 8
(I don't know how often waypoints check themselves or will it work, so this is just theory)
or
create waypoints for your group and then sync a trigger to the first waypoint and type in the triggers condition field
daytime >= 8
by using the daytime command your group will start moving only at eight O'clock and not after 900 seconds.. but as I said, in most cases 'the macguba way' is just fine ;)
..just wanted to come in here and confuse you folks some more :-[ :-X
/me ::)
;D
-
A-HA! ;D You fell right into my trap Artak! 8) I knew you'd come along and explain the daytime command. :P
-
It's the only command I really know and feel proud of ;D
/me walks away proudly
-
Thanks guys!
hmmm ask a silly question but how would i use Artak's way to set a unit off during the twilight hours?
-
You'd have to play around with the mission and find out when twilight is on the day you choose ..... I think there are formulae for that sort of thing somewhere, or maybe I'm thinking of tides. May not be OFPEC, might be on the official forums www.flashpoint1985.com
-
just a small question to Artak, is it possible to use the daytime command in a trigger too? 8) triggers just rule over waypoints
-
Like all commands you can use dayTime in triggers, waypoints, init field of units, scripts ... anywhere you like.
-
k, just to make sure ;) thnx