Sorry but I'm still confused in making spell MUI and I need some help. Last week someone had told me to sum up the hastable and I sum up it but it isn't perfect and can be easily cause imbalance in game.
But there is a problem about the duration and I don't know how to fix it. The problem can be shown easily as diagram below.
If you use at 1st seconds and someone use at 4th seconds. The first effect will not stop at 5s of the game but will stop at 9s. I have test it when I use this ability 10 times with the hero with 10int. From calculation it should heal the target for 500hp. But if I use the spell as the diagram, it comes out as healing target 2000hp !!!!
Can anyone help me changing this trigger pls? +rep
It would be great if it work as same as seperating one.
PS: Why I have to set (Key(target unit of ability being cast)) instead of (Key(casting unit)) ??
Trigger:
- Skill Rejuvenation
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Rejuvenation
- Actions
- Set Spell_Reju_Temp_Real = (Load 1 of (Key (Target unit of ability being cast)) from Spell_Reju_Hastable)
- Set Spell_Reju_Temp_Real = (Spell_Reju_Temp_Real + ((Real((Intelligence of (Casting unit) (Include bonuses)))) / 10.00))
- Hashtable - Save Handle Of(Target unit of ability being cast) as 0 of (Key (Target unit of ability being cast)) in Spell_Reju_Hastable
- Hashtable - Save Spell_Reju_Temp_Real as 1 of (Key (Target unit of ability being cast)) in Spell_Reju_Hastable
- Hashtable - Save 5.00 as 2 of (Key (Target unit of ability being cast)) in Spell_Reju_Hastable
- Set Spell_Reju_Check = (Spell_Reju_Check + 1)
- Trigger - Turn on Skill Rejuvenation Effect <gen>
- Unit Group - Add (Target unit of ability being cast) to Spell_Reju_Group
- Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Objects\Spawnmodels\NightElf\EntBirthTarget\EntBirthTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Events
Trigger:
- Skill Rejuvenation Effect
- Events
- Time - Every 0.10 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in Spell_Reju_Group and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Load 2 of (Key (Picked unit)) from Spell_Reju_Hastable) Greater than 0.00
- ((Picked unit) is dead) Equal to False
- Then - Actions
- Unit - Set life of (Load 0 of (Key (Picked unit)) in Spell_Reju_Hastable) to ((Life of (Load 0 of (Key (Picked unit)) in Spell_Reju_Hastable)) + (Load 1 of (Key (Picked unit)) from Spell_Reju_Hastable))
- Hashtable - Save ((Load 2 of (Key (Picked unit)) from Spell_Reju_Hastable) - 0.10) as 2 of (Key (Picked unit)) in Spell_Reju_Hastable
- Else - Actions
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Spell_Reju_Hastable
- Set Spell_Reju_Check = (Spell_Reju_Check - 1)
- Unit Group - Remove (Picked unit) from Spell_Reju_Group
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- If (Spell_Reju_Check Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
- Unit Group - Pick every unit in Spell_Reju_Group and do (Actions)
- Events
But there is a problem about the duration and I don't know how to fix it. The problem can be shown easily as diagram below.
If you use at 1st seconds and someone use at 4th seconds. The first effect will not stop at 5s of the game but will stop at 9s. I have test it when I use this ability 10 times with the hero with 10int. From calculation it should heal the target for 500hp. But if I use the spell as the diagram, it comes out as healing target 2000hp !!!!
Can anyone help me changing this trigger pls? +rep
It would be great if it work as same as seperating one.
PS: Why I have to set (Key(target unit of ability being cast)) instead of (Key(casting unit)) ??