OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Jim666 on 29 Mar 2005, 17:28:01

Title: Trigger timer
Post by: Jim666 on 29 Mar 2005, 17:28:01
Ok, ive got a trigger, and ive got it set to activate at a certain time. 5400 seconds in this case (Dont ask..)

I want this timer to stop after another trigger or a script is activated. is that possible and if so how would i go about doing this?
Title: Re:Trigger timer
Post by: macguba on 29 Mar 2005, 18:17:47
init.sqs
timeDone=false
stopTime=false

Trigger 1
Countdown:     5400   5400    5400
Condition:  as you like
On Activation:   timeDone=true

Trigger 2
Condition:   timeDone and (not stopTime)
On activation:   as you like

Trigger 3
Condition:  as you like
On Activation:   stopTime=true

Note that OFP does not count time accurately:  a second in the game is not necessarily a second in the real world.    Experiment to get what you want.   Try using a dayTime command rather than a trigger timer.