In the guard definition you would make him use:ImpieTwo wrote:I'd add that in if I knew how to code it in Decorate.Nash wrote:Nice. Somehow I expected those other enemies to wake up when someone dies too close beside them, and that guard who already entered their See state should've just woken up the other enemy.
A_CheckProximity("WakeUpEveryone", "DeadGuyAlerter", 2048, 1, CPXF_CHECKSIGHT | CPXF_DEADONLY)
Every 35 tics. Now, you should change "DeadGuyAlerter" to the name of the enemy that's going to be dying near the guard, add a full list of them if necessary. 2048 is the range in units, so you can change that too if you want.
In the WakeUpEveryone state, the guard would use A_AlertMonsters, and perhaps have some animation like he's blowing a whistle and then wakes up every enemy in the general area.
Do note, that at minimum you would require ZDoom 2.8.1/GZDoom 2.1, Zandronum doesn't support A_CheckProximity yet.