OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Trash Can Man on 05 Mar 2005, 01:45:03

Title: countdown script
Post by: Trash Can Man on 05 Mar 2005, 01:45:03
Do you know how to setup either a trigger or some type of script that start a countdown? What I am trying to do is when we reach a certain point on a map ( near a prison camp) that a countdown starts and then enemy re-enforcements arrive to kill the prisoners. If you can help me I would appreciate it....thanks...

Regards,
Trash Can Man
Title: Re:countdown script
Post by: rhysduk on 05 Mar 2005, 03:07:57
Open up the waypoints dialogue, and use the countdown / timer settings!

Rhys
Title: Re:countdown script
Post by: Trash Can Man on 05 Mar 2005, 04:07:24
Open up the waypoints dialogue, and use the countdown / timer settings!

Rhys

Can you explain that alittle...i have never heard of what you are saying.
Title: Re:countdown script
Post by: THobson on 05 Mar 2005, 09:48:20
Rhys is saying that if you open (double click) on a waypoint you will see some boxes called
Timeout:  Min  Max and Mid
Numbers you put here represent the number of seconds the unit will wait after the condition field of the waypoint is satisfied before it stars moving to the next waypoint.

You might also wish to look at the Timeout feature of triggers.  Triggers have two time options: countdown and timeout

In Countdown mode the trigger will activate the specified number of seconds after the condition becomes true

In Timeout mode the trigger will activate the specified number of seconds after the condition become true only if the condition remains true all that time

Note that:
The countdown mode of a trigger works like the timeout mode of a waypoint - just a little OFP quirk
also if you put different numbers in the Min Max and Mid boxes OFP will select a random amount of time based on the numbers you give it.

What you are trying to do could be done by giving the soldiers a waypoint where the condition is something that becomes true when you want the countdown to start and the numbers you put in the timeout boxes will  deterimne how long they wait after that before moving on.

Alternatively you could use a switch trigger with the same condition  and same times specificed.
Title: Re:countdown script
Post by: Trash Can Man on 05 Mar 2005, 10:14:49
Thanks! I think I got it!! I appreciate it.

Regards,
Trash Can Man