Guys just little bit of help if some one could explain how it works.
lets say I spawn a unit AL30 in the start of my map then somebody dies and I would like now add ability to Al30 unit? or kill him or heal him so on
Lets say stupid example like this
I would like to know how do u tell the function where to get the Unit? and or does it take the unit from the function down or above it? any one that would explain it to me would help alot
lets say I spawn a unit AL30 in the start of my map then somebody dies and I would like now add ability to Al30 unit? or kill him or heal him so on
Lets say stupid example like this
JASS:
function SpawnUnit takes nothing returns unit// Don't know if this is right
local unit u=CreateUnit(whateverplayer,'Al30',2000,2000,0)
return // what must I add here?
endfunction
function AddAbility takes unit u returns nothing
set UnitAddAbility(u,'die')
endfunction
I would like to know how do u tell the function where to get the Unit? and or does it take the unit from the function down or above it? any one that would explain it to me would help alot