OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gadolinite on 22 May 2003, 02:11:44

Title: light post alarm
Post by: gadolinite on 22 May 2003, 02:11:44
 8)how would you play an alarm sound from a light post activated by a trigger? No, not the air raid siren, but the sound similar to a Ford Model A horn (Ahooo Ahooo) the one that never stops when activated by a trigger.  However, if the light post is destroyed, I want the alarm to stop, simulating the effect of a speaker getting destroyed.  It would be best to put this in a script?

How would you do this?
Title: Re:light post alarm
Post by: macguba on 22 May 2003, 12:47:35
Place a trigger over the lamppost.

Actvation:    repeatedly
Condition:   alarm1
Effects:   alarm sound

When the variable alarm1 is true, the alarm will sound.   When it is false, it will not.     Control the variable with scripts or triggers as you like.    For instance you may have a trigger like this

Condition:   (getdammage object 1234) > 0.9
On Activation:    alarm1=false

syntax not guaranteed but you get the picture.    Check your system of logic to ensure that the alarm will go on and off correctly even if the player does things in the wrong order.
Title: Re:light post alarm
Post by: gadolinite on 23 May 2003, 00:03:22
 :) :) :) :) :)thanks, Big mac :) :) :) :) :)
Title: Re:light post alarm
Post by: gadolinite on 23 May 2003, 02:34:02
see 'deleting triggers' for an update