Page 1 of 1

OnCharacterDeath Funtions

Posted: Sun Jan 08, 2012 10:34 pm
by Noobasaurus
I was looking at the docs and came across this, and it said:
CharacterDeath: function (player, killer).

How would I use this? I tried:

OnCharacterDeath(
function(player, killer))

but where would you put the outcome or what happens to the player or killer? To make it so the person who killed the other person got 75 sheild every time I tried:

OnCharacterDeath(
function(player, killer)
player, addsheild = "75")

but it didn't work. It seems that after further studying it applies to everyone when a unit is killed. How would you make it so when a player kills another player(AI or human) they get 75 shield?

Re: OnCharacterDeath Funtions

Posted: Sun Jan 08, 2012 10:55 pm
by Marth8880
A typo... :o

You said "addsheild" when it SHOULD be "AddShield"...

Re: OnCharacterDeath Funtions

Posted: Sun Jan 08, 2012 11:05 pm
by AQT
You need to familiarize yourself with the following before you can even attempt this, as it seems you lack a basic foundation:
The last link is good for understanding the structure of similar functions.