I decided to make a personalized pot, but I couldnt find anything in a trigger that healed 1000 hp for a especific unit (if you know, please let me know)
So Ive decided to learn JASS, and I got this far:
Jass:
//Start
Function Potion takesunit u returns noting
localunit u
loopset u =Player(1)exitwhen u ==nullcallunitstate(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))endloopendfunction//End
But that would only heal all the HP of a unit, wich I dont want...
What do I do next?
Thnks
//Start
Function Potion takesunit u returns noting
localunit u
loopset u =Player(1)// u cant set unit to a player u need GetTriggerUnit()exitwhen u ==null// and not a loopcallunitstate(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))endloopendfunction//End
so thats what it should be
Jass:
function Actions takesnothingreturnsnothinglocalunit u =GetTriggerUnit()callSetUnitState( u ,UNIT_STATE_LIFE,GetUnitState( u ,UNIT_STATE_LIFE)+1000)endfunction
__________________
Last edited by Saia_Djinn; 07-03-2009 at 08:46 PM.
actually, im trying to learn JASS to actually do this pot...
i just didnt look well enough....
thnks a lot guys (specially Marsmallos)
Now i have one last problem:
Now each time a hero moves the pot, itll give him 1000 htps =(