Home   Help Search Login Register  

Author Topic: alarm trigger timeout?  (Read 1343 times)

0 Members and 1 Guest are viewing this topic.

Chud

  • Guest
alarm trigger timeout?
« on: 18 Sep 2005, 22:10:40 »
I have a trigger with an alarm that sounds when the east are not present. How do I get the alarm to shut off after awhile???

Abe

  • Guest
Re:alarm trigger timeout?
« Reply #1 on: 20 Sep 2005, 17:18:25 »
I've been wondering how to time out triggers.  There must be a way.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:alarm trigger timeout?
« Reply #2 on: 20 Sep 2005, 17:58:57 »
Umm, I think this requires multiple triggers?

One trigger that sets a variable like my_alarm to true when you want the alarm to sound, the one playing the sound would have condition my_alarm and a third trigger would also have a condition my_alarm but would also have countdown of the time you want the alarm to sound (min, max, mid boxes) and 'on activation' field would have my_alarm=false

Trigger 1:
The trigger detecting East not present
Repeatedly
Condition: this && !(my_alarm)
On activation: my_alarm=true

Trigger 2 (sound):
size: 0/0
Repeatedly
Condition: my_alarm
Effect: alarm sound

Trigger 3
size: 0/0
Repeatedly
Min: (time in seconds) Max: (time in seconds) Mid: (time in seconds)
Condition: my_alarm
On Activation: my_alarm=false


That should work, but no guarantees :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:alarm trigger timeout?
« Reply #3 on: 20 Sep 2005, 18:00:25 »
init.sqs

alarmOn=false


Trigger:-

Repeatedly
Condition: alarmOn
Effects:  alarm sound


Use other triggers to set the variable alarmOn to true or false as you like, thereby turning the alarm sound on or off.  For example:-

Trigger1:
East detected by West
On activation:  alarmOn=true

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

When East is detected the variable is set to true at the alarm sounds.  At the same time, trigger2 is fired and starts a 30 second countdown.     30 seconds later the variable is set back to false (as it was at the start of the mission in init.sqs) and the alarm stops.


Edit:  Grrr ... too slow again.
« Last Edit: 20 Sep 2005, 18:01:12 by macguba »
Plenty of reviewed ArmA missions for you to play

Chud

  • Guest
Re:alarm trigger timeout?
« Reply #4 on: 21 Sep 2005, 03:58:04 »
Thanx.... been wondering how to do that for some time now.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:alarm trigger timeout?
« Reply #5 on: 21 Sep 2005, 04:14:10 »
you can also do stuff similar to that in the deactivation box of a trigger. i.e.

Trigger:
West Detected by East Repeatedly
Cond: this
on Activation: westDetected = true
on Deactivation: westDetected = false

AlarmTrigger:
Cond: westDetected
Effects: play Alarm sound

If west is detected by east, it will play the alarm, but when east doesn't see west anymore, the alarm shuts off.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08