Jump to content

Sign in to follow this  
TraxusIV

how to attribute kills to a player or unit

Recommended Posts

Ok, so if I use _bomb= "HelicopterExploSmall" createVehicle _somePosition; I can kill stuff. How would I go about adding those kills to a player's score? How would I assign aggro, so that enemies know it was the player?

Share this post


Link to post
Share on other sites

AddScore requires that I first know which units were killed by the explosion.

Share this post


Link to post
Share on other sites

Right, clearly addscore is how you add to the players score, but !(alive enemy1) just tells me if the enemy is dead, not that he died from the explosion. He could have died from a rabbit bite for all we know. So let me rephrase the question: is there any way to know specifically which units were hit by, or killed by, a specific explosion that is created programatically?

Share this post


Link to post
Share on other sites

this addeventhandler ["[url="http://community.bistudio.com/wiki/ArmA_2:_Event_Handlers#HandleDamage"]handledamage[/url]", {if((_this select 4) == "HelicopterExploSmall") then {player addscore 100}}];

Using HitPart might be better. _this select 6 [hit value, indirect hit value, indirect hit range, explosive damage, ammo class name]. ammo class name would return "HelicopterExploSmall"

Edited by cobra4v320

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  

×