OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: thenick100 on 30 Apr 2003, 23:34:38

Title: alarm...
Post by: thenick100 on 30 Apr 2003, 23:34:38
Hey, i have a problem... i have a base at night with patrols around and i want there to be an alarm if any west are spotted... i can make the alarm sound when i am detected, but it then stays on for the rest of the mission if i stay alive... which is annoying... how can i set up a trigger so that when west are seen, the alarm goes off for say, 1/2 minutes then goes off as the base goes back to all clear... and... is it possible to have the trigger set off the alarm at a different location, eg a light pole with speakers on it, so that the alarm comes from across the base rather than where the trigger is...

Thanks, Nick
Title: Re:alarm...
Post by: SharkDog on 01 May 2003, 00:06:07
I think there are 2 differant alarms one that goes on and on and one thats only one time.
Title: Re:alarm...
Post by: macguba on 01 May 2003, 00:21:40
Place a trigger where you want the alarm to sound.    Obviously put alarm in Effects.   Set it to repeatedly.

Condition:  alarmOn

Now the alarm will sound when the variable alarmOn is true, and it will not sound when it is false.   Use other triggers and scripts to make the variable - and hence the alarm - do what you want.
Title: Re:alarm...
Post by: thenick100 on 01 May 2003, 00:23:14
how do i do that? im not good with triggers
Title: Re:alarm...
Post by: macguba on 01 May 2003, 00:28:12
Make a trigger over the base, East detected by West or whatever.  You can do that.     Now, don't make this trigger sound the alarm.  Instead, do this

On Activation:   alarmOn=true

Now make another trigger.  

Countdown:       30     30     30
Condition: alarmOn
On Activation:    alarmOn=false

This will switch the alarm off after 30 seconds.  

Does that make sense?
Title: Re:alarm...
Post by: thenick100 on 01 May 2003, 00:34:45
yeah cheers!
Title: Re:alarm...
Post by: thenick100 on 01 May 2003, 00:47:32
hey wait a sec... it keeps saying error, alarmon|#|=true  error reserved variable in expression...wtf?
Title: Re:alarm...
Post by: SimonRussi on 05 May 2003, 11:32:14
try another variable name.

Simon