Hi!
I'm using the BAS addons and the black rebels from that pack. When you fire at them they scream, except when you hit them in the head. What I wanna do is to have an alarm go off if they scream, but no alarm if they don't scream.
It's pretty annoying playing in the night with NVG and supressed weapons and not alerting other enemies when the ones you kill in a clumsy fashion holler out.
What I've done so far is to put the following in every enemy's init field:
this addeventhandler ["hit","_this exec {fired\hit1.sqs}"]
And here is the script:
;Hit1.sqs
_unit = _this select 0
? not alive _unit : exit
~4
alert0 = true ; publicvariable "alert0"
exit
This works pretty well if you hit the guy in an arm or leg. He then screams and the alarm goes off after 4 seconds. But when you shoot him in the torso he first screams and then dies instantly, hence the script exits.
Is there a way to check whether someone gets hit in the torso or something?
Any ideas?
Cheers