Jump to content
Sign in to follow this  
squidraider

Stop alarm triggering when spotter is killed.

Recommended Posts

Howdy! I'm working on a stealthy sort of mission where if you're spotted, you have 10 seconds to kill the dude who saw you before an alarm is set off and reinforcements come and the sh*t hits the fan. Now. This code works when I'm right up in the enemy's face on a testing mission but when I put it on the actual mission, it doesn't work. Anybody got any ideas?

Trigger 1, repeatedly, BLUFOR spotted by OPFOR

Onact:

hint "running";
detected=false; 
counter=10; 
spotCounter = 0; 
while{counter > 0} do {
counter = counter - 1;
{
	if (side _x != west) then { 
		if ((((_x knowsabout group Player) > 0) || behaviour _x == "AWARE")&& alive _x) 
			then  {
			hint "Does Not Get Here"; 
			spotCounter = spotCounter+1;
			}
		}
} foreach (allUnits); 
if (spotCounter > 0) then {
	detected=true;
	hint "detset";
} else {
detected=false;
hint "detUnset";
}; sleep 1;}

Trigger 2, repeatedly

condition: detected;

onact: hint "ALARM";

(plays alarm sound)

timeout 10.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×