a bit of spell help

Benx_X

New Member
im trying to make a spell that gives you mana for every enemy you kill, though i cant find a condition for the unit having a specific buff not realy worth it but this is all i got so far =\

Code:
Events
????Unit - A unit owned by Player 11 (Dark Green) Dies
Conditions
????(Unit-type of (Killing unit)) Equal to Zealot
Actions

is there a condition that is killing unit has (buff) ive got a variable for the buff and unit type if i actualy do need it ty in advance for any help

EDIT: i found the condition i was looking for but is there a way to add a set amount of mana to a unit/hero rather then setting it
 
Werbung:

Undead_Lives

New Member
Here's what you do.
You can use a variable array. Make it 3,4,5 (depending on how many lvls the skill has) then make 3,4,5 If, Then, Elses.
If
Variable=1, then _____, else do nothing.
etc.
As for the ____ part, you put in this
Set mana = (Current Mana) + whatever amount.

If that doesn't work (don't have WE open right now :p) Just replace Current Mana with a variable that equals the current mana.
 

Benx_X

New Member
thanks U_L i realy just started to understand variables :D since its an ulti its only 1 lvl btw, also could you make it or something then put the code in cause this is confusing... im a newb at map making xD

EDIT: thank you again (i decided it to change to health cause it was for a caster hero he needs it xD!) though its not exactly how you said and i didnt have to use variables ^^.

Code:
Events
????Unit - A unit Dies
Conditions
????(Unit-type of (Killing unit)) Equal to Zealot
????((Killing unit) has buff Energy drain ) Equal to True
Actions
????Unit - Set life of (Killing unit) to ((Life of (Killing unit)) + 50.00)

i just relised how simple it is xD
 

Undead_Lives

New Member
Ya, that's ok. There was a time I couldn't figure that out :p
And the only reason I mentioned you might have to use a variable for the health is cause I wasn't sure if Life of Killing Unit was available :p
 
Werbung:
Top