this cant work where is the problem can someone help?
the goal is to all buffed unit ,the casting hero gets they hp copy by 25%
all buffed unit if there is 4 unit and each unit have 100hp full then copy
25% of they hp in this example is 100-25%=25 hp then * 4 unit=100 hp + for
hero and got timer 30 sec
i use all integer in variables but i use string for memorise the hp of buffed unit
before casted spell so where i did wrong?
the goal is to all buffed unit ,the casting hero gets they hp copy by 25%
all buffed unit if there is 4 unit and each unit have 100hp full then copy
25% of they hp in this example is 100-25%=25 hp then * 4 unit=100 hp + for
hero and got timer 30 sec
i use all integer in variables but i use string for memorise the hp of buffed unit
before casted spell so where i did wrong?
-
Events
- Unit - A unit Stops casting an ability
-
Conditions
- (Ability being cast) Equal to Life Bonus
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) has buff Roar) Equal to True)) and do (Actions)
-
Loop - Actions
- Set memoryPICKEDhp = (String((Point-value of (Unit-type of (Picked unit)))))
- Unit - Set life of (Picked unit) to 25.00%
- Set CountOFunits = (Number of All buffs considered Magic or physical on (Picked unit) (Exclude expiration timers, Exclude auras))
- Set HPpickedUNITS = (Integer((Life of (Picked unit))))
- Unit - Set life of (Picked unit) to (Real(memoryPICKEDhp))
- Set heroHPbonus = (CountOFunits x HPpickedUNITS)
- Set HeroHP = (Point-value of (Casting unit))
- Unit - Set life of (Casting unit) to ((Real(heroHPbonus)) + (Real(HeroHP)))
- Wait 15.00 seconds
- Unit - Set life of (Casting unit) to (Real(HeroHP))
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) has buff Roar) Equal to True)) and do (Actions)