Jump to content
Sign in to follow this  
BomosBoy

onPlayerKilled and onPlayerRespawn parameters

Recommended Posts

I have a short question:

Do i need to use the parameters from onPlayerKilled(<oldUnit>, <killer>) or onPlayerRespawn(<newUnit>, <oldUnit)? Because i simply can use <player> cause its the same as the killed unit....

Example.

_oldUnit = _this select 0;

//1.
_oldUnit setVariable["blub", true];

//2.
player setVariable["blub", true];

//3. 
blub = true;

Whats the difference if i use this on the same unit (player == _oldUnit)?

Share this post


Link to post
Share on other sites

You answered your question yourself. If player is the same as _oldUnit, than you can obviously use the player variable.

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  

×