I'm making a spell where you channel the ability on the target, and then you drain life of nearby units and give it as rough hp to the target. I made arrays to show some friends the skill and i added the ferivication (no idea how to spell it) to look if it works, but now when i stop the skill while i was channeling, the lightning effects stil happen, even with the if/then/else of Ferification, got 2 triggers:
Help in GUI please I want them to stop following me, those lightning when i stop the spell
-
Events
- Unit - A unit Begins channeling an ability
-
Actions
- Set Ferivication[(Player number of (Owner of (Casting unit)))] = Yes
-
For each (Integer A) from 1 to 3, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Ferivication[(Player number of (Owner of (Casting unit)))] Equal to No
- (Percentage life of (Target unit of ability being cast)) Equal to 100.00
-
Then - Actions
- Unit - Order (Casting unit) to Stop
-
Else - Actions
- Unit Group - Remove all units of NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))] from NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]
- Unit Group - Add (Casting unit) to NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]
- Unit Group - Add (Target unit of ability being cast) to NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]
- Set Lifegained1sec[(Player number of (Owner of (Casting unit)))] = 0.00
-
Unit Group - Pick every unit in (Random 1 units from (Units within 500.00 of (Position of (Casting unit)) matching ((((Matching unit) is in NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]) Equal to False) and (((Matching unit) is dead) Equal to False)))) and do (Actions)
-
Loop - Actions
- Lightning - Destroy Lightningie1[(Player number of (Owner of (Casting unit)))]
- Unit Group - Add (Picked unit) to NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]
- Set Lifegained1sec[(Player number of (Owner of (Casting unit)))] = ((Max life of (Picked unit)) / 50.00)
- Unit - Set life of (Target unit of ability being cast) to (Lifegained1sec[(Player number of (Owner of (Casting unit)))] + (Life of (Target unit of ability being cast)))
- Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) - 2.00)%
- Lightning - Create a Drain lightning effect from source (Position of (Casting unit)) to target (Position of (Picked unit))
- Lightning - Change color of (Last created lightning effect) to (1.00 0.00 0.00) with 9.00 alpha
- Set Lightningie1[(Player number of (Owner of (Casting unit)))] = (Last created lightning effect)
-
Loop - Actions
-
Unit Group - Pick every unit in (Random 1 units from (Units within 500.00 of (Position of (Casting unit)) matching ((((Matching unit) is in NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]) Equal to False) and (((Matching unit) is dead) Equal to False)))) and do (Actions)
-
Loop - Actions
- Lightning - Destroy Lightningie1_Copy[(Player number of (Owner of (Casting unit)))]
- Unit Group - Add (Picked unit) to NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]
- Set Lifegained1sec[(Player number of (Owner of (Casting unit)))] = ((Max life of (Picked unit)) / 50.00)
- Unit - Set life of (Target unit of ability being cast) to (Lifegained1sec[(Player number of (Owner of (Casting unit)))] + (Life of (Target unit of ability being cast)))
- Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) - 2.00)%
- Lightning - Create a Drain lightning effect from source (Position of (Casting unit)) to target (Position of (Picked unit))
- Lightning - Change color of (Last created lightning effect) to (1.00 0.00 0.00) with 1.00 alpha
- Set Lightningie1_Copy[(Player number of (Owner of (Casting unit)))] = (Last created lightning effect)
-
Loop - Actions
-
Unit Group - Pick every unit in (Random 1 units from (Units within 500.00 of (Position of (Casting unit)) matching ((((Matching unit) is in NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]) Equal to False) and (((Matching unit) is dead) Equal to False)))) and do (Actions)
-
Loop - Actions
- Lightning - Destroy Lightningie1_Copy_2[(Player number of (Owner of (Casting unit)))]
- Unit Group - Add (Picked unit) to NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]
- Set Lifegained1sec[(Player number of (Owner of (Casting unit)))] = ((Max life of (Picked unit)) / 50.00)
- Unit - Set life of (Target unit of ability being cast) to (Lifegained1sec[(Player number of (Owner of (Casting unit)))] + (Life of (Target unit of ability being cast)))
- Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) - 2.00)%
- Lightning - Create a Drain lightning effect from source (Position of (Casting unit)) to target (Position of (Picked unit))
- Lightning - Change color of (Last created lightning effect) to (1.00 0.00 0.00) with 9.00 alpha
- Set Lightningie1_Copy_2[(Player number of (Owner of (Casting unit)))] = (Last created lightning effect)
-
Loop - Actions
-
Unit Group - Pick every unit in (Random 1 units from (Units within 500.00 of (Position of (Casting unit)) matching ((((Matching unit) is in NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]) Equal to False) and (((Matching unit) is dead) Equal to False)))) and do (Actions)
-
Loop - Actions
- Lightning - Destroy Lightningie1_Copy_3[(Player number of (Owner of (Casting unit)))]
- Unit Group - Add (Picked unit) to NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]
- Set Lifegained1sec[(Player number of (Owner of (Casting unit)))] = ((Max life of (Picked unit)) / 50.00)
- Unit - Set life of (Target unit of ability being cast) to (Lifegained1sec[(Player number of (Owner of (Casting unit)))] + (Life of (Target unit of ability being cast)))
- Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) - 2.00)%
- Lightning - Create a Drain lightning effect from source (Position of (Casting unit)) to target (Position of (Picked unit))
- Lightning - Change color of (Last created lightning effect) to (1.00 0.00 0.00) with 9.00 alpha
- Set Lightningie1_Copy_3[(Player number of (Owner of (Casting unit)))] = (Last created lightning effect)
-
Loop - Actions
- Wait 1.00 seconds
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
- Unit - A unit Stops casting an ability
-
Actions
- Set Ferivication[(Player number of (Owner of (Casting unit)))] = No
- Unit Group - Remove all units of NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))] from NotanymoreInCastRed[(Player number of (Owner of (Casting unit)))]
- Lightning - Destroy Lightningie1[(Player number of (Owner of (Casting unit)))]
- Lightning - Destroy Lightningie1_Copy[(Player number of (Owner of (Casting unit)))]
- Lightning - Destroy Lightningie1_Copy_2[(Player number of (Owner of (Casting unit)))]
- Lightning - Destroy Lightningie1_Copy_3[(Player number of (Owner of (Casting unit)))]
Help in GUI please I want them to stop following me, those lightning when i stop the spell