Health Trigger %

RedSword

New Member
Reaction score
4
Hi, I was wondering, why my trigger doesn't work, here it is :

JASS:
Holy Light
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        (Ability being cast) Equal to Holy Light 
    Actions
        If ((Level of Holy Light  for (Triggering unit)) Equal to 1) then do (Unit - Set life of (Target unit of ability being cast) to ((Percentage life of (Target unit of ability being cast)) + 15.00)%) else do (Do nothing)
        If ((Level of Holy Light  for (Triggering unit)) Equal to 2) then do (Unit - Set life of (Target unit of ability being cast) to ((Percentage life of (Target unit of ability being cast)) + 25.00)%) else do (Do nothing)
        If ((Level of Holy Light  for (Triggering unit)) Equal to 3) then do (Unit - Set life of (Target unit of ability being cast) to ((Percentage life of (Target unit of ability being cast)) + 35.00)%) else do (Do nothing)


My Holy Light is a remixed from "Inner Fire" Ability, could that be the problem ?

I tryed my ability on a unit having 100/10000 HP, but it was only giving him the health regeneration from inner fire and not the ones from that trigger above (additionnal 15% at lv 1).

Btw : I did makes sure that the Holy Light was the custom one and not the blizzard's one.
 

waaaks!

Zinctified
Reaction score
255
how about not using percentage instead of values

or
Code:
life of target unit of ability being cast + 15%
change a part of ur code to this

Code:
((Percentage life of (Target unit of ability being cast)) + 15.00)%)
change this part to the one above
 

Slapshot136

Divide et impera
Reaction score
471
1. use "starts the effect of" instead of finishes casting
2. u dont need those 3 actions, just do (Unit - Set life of (Target unit of ability being cast) to ((Percentage life of (Target unit of ability being cast)) + (15.00 + (10 x (level of ability being cast))%)
3. do an if/then check so that ur not setting a unit's hp to over 100%
 

RedSword

New Member
Reaction score
4
I couldn't retrieve "level of ability being cast"; and a unit can have over 100 % hp ?

Thx btw, using "starts the effect of" made my spell work, but i need 3 conditions for the 3 level, did u mean to use variable for the level of the ability ?

EDIT : I found how to put the level of the ability.(Integer --> Real).

RE-Edit : A unit canno't have more than 100%, why did you say that then ? I there a glitch with HP ?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top