FannyShaver
Well-Known Member
- Reaction score
- 31
Trying to make a spell for one single hero only that when cast will set his hitpoints to hitpoints he had (5 seconds + (1 second x ability level)) ago. I pretty much have no clue how to start
You need two triggers: One to save your hitpoints of the last seconds for specific intervals, and one to restore your hitpoints.
here's one way to do it, but it only works if there really is just one single unit in the game with this ability. Otherwise you'd have to change it a bit.
Trigger:
- start
- Events
- Time - Elapsed game time is 0.00 seconds
- Conditions
- Actions
- Set Unit_Hero = <Your Unit>
Trigger:
- remember hp
- Events
- Time - Every 0.10 seconds of game time
- Conditions
- Actions
- For each (Integer A) from 1 to 99, do (Actions)
- Loop - Actions
- Set Real_Array_HP[(101 - (Integer A))] = Real_Array_HP[(100 - (Integer A))]
- Set Real_Array_HP[1] = (Percentage life of Unit_Hero)
Trigger:
- reset
- Events
- Unit - A unit Starts the Effect of an Ability
- Conditions
- (Ability being cast) Equal to Reset
- Actions
- Unit - Set life of Unit_Hero to Real_Array_HP[(10 x (4 + (Level of Reset for (Triggering unit))))]%