OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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
-
I think there are 2 differant alarms one that goes on and on and one thats only one time.
-
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.
-
how do i do that? im not good with triggers
-
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?
-
yeah cheers!
-
hey wait a sec... it keeps saying error, alarmon|#|=true error reserved variable in expression...wtf?
-
try another variable name.
Simon