Jump to content
Sign in to follow this  
icebreakr

Checking who is the killer player/AI.

Recommended Posts

KaRRiLLioN has made a great script for ArmA 1 that would check who killed who, for example innocent civilian target:

killmonitor.sqs:

#Init
unit_killed = objNull
unit_killer = objNull

#Monitor
~1
?isNull unit_killed || isNull unit_killer : goto "Monitor"

di globalchat Format ["VIP (%1) has been KIA by %2.",unit_killed,unit_killer]

goto "Init"

Killed.sqs:

_killed = _this select 0
_killer = _this select 1

unit_killer = _killer
publicVariable "unit_killer"

unit_killed = _killed
publicVariable "unit_killed"

Exit

... and you could add a init line to every person that needed that check:

this addEventHandler ["killed",{_this exec "Killed.sqs"}]

Somehow this code crashes ArmA 2, can someone test it out and find a solution to use script in A2? Script must work in MP. Thanks.

Share this post


Link to post
Share on other sites

Not sure about the code, but I know there's a fix coming in 1.03 for units not reporting who killed them, so maybe that'll fix this issue?

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  

×