alarms

Billo

aa
Feb 8, 2016
921
404
hey guys so i am making a ctf map for the frontline community update and i need your help
how can i make the alarms start making noise when the player grabs the intel?
 

henke37

aa
Sep 23, 2011
2,075
515
The flag entity has various outputs for when it's been picked up. Try using one of them?
 

Muddy

Muddy
aa
Sep 5, 2014
2,575
4,592
You can use an ambient_generic that triggers when the flag is picked up (the OnPickup output). Make sure the ambient_generic has the 'play everywhere' flag checked.

Bear in mind however that that will cause the alarm to go off every time the flag is picked up, regardless of where it is, so what'd be a better solution is to have a logic_relay that triggers the alarm, and also disables itself when the flag is first picked up, and is re-enabled when the flag is returned to its initial spawn area. That way, the alarm will only sound when the flag is first taken, but not if it's dropped and picked up again.

tl;dr: give your flag (intelligence briefcase) the following outputs:
OnPickup <your logic_relay> Trigger
OnReturn <your logic_relay> Enable

And in the logic_relay:
OnTrigger <your ambient_generic> PlaySound
OnTrigger <your logic_relay> Disable