It's working properly but I can target more thant 1 unit, else it fanish from the first I was able to do it with an other spell but not this one, what should be changed?
Note: I know my special effect leaks, I just put it there for a visual while testing
Trigger:
- Leech Seed
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Leech Seed
- Actions
- Custom script: local unit e = GetSpellTargetUnit()
- Custom script: set udg_Temp_Unit = e
- For each (Integer B) from 1 to 30, do (Actions)
- Loop - Actions
- Wait 1.00 seconds
- Set intLifeMax[0] = (Integer((Life of Temp_Unit)))
- Unit - Cause (Triggering unit) to damage Temp_Unit, dealing 3.00 damage of attack type Chaos and damage type Normal
- Set intLifeMin[0] = (Integer((Life of Temp_Unit)))
- Set intLifeAfter = (Integer((Life of (Triggering unit))))
- Unit - Set life of (Triggering unit) to ((Real(intLifeAfter)) + (1.00 x ((Real(intLifeMax[0])) - (Real(intLifeMin[0])))))
- Special Effect - Create a special effect attached to the overhead of Temp_Unit using Abilities\Spells\Human\Slow\SlowCaster.mdl
- Loop - Actions
- Custom script: set e = null
- Events
Note: I know my special effect leaks, I just put it there for a visual while testing