-
mana Copy
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
- Custom script: local lightning udg_t
- Set i[1] = (Units of type Well)
-
Unit Group - Pick every unit in i[1] and do (Actions)
-
Loop - Actions
- Set j[1] = (Position of (Picked unit))
- Set k[1] = (Picked unit)
- Set i[2] = (Units within 700.00 of j[1] matching (((Owner of (Matching unit)) Equal to (Owner of k[1])) and ((Unit-type of (Matching unit)) Equal to Irrigator)))
- Set i[3] = (Units within 700.00 of j[1] matching (((Owner of (Matching unit)) Equal to (Owner of k[1])) and ((Unit-type of (Matching unit)) Equal to Water Tower)))
-
Unit Group - Pick every unit in i[2] and do (Actions)
-
Loop - Actions
- Set k[2] = (Picked unit)
- Set j[2] = (Position of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Mana of k[2]) Less than ((Max mana of k[2]) - 5.20)
- (Mana of k[1]) Greater than 5.20
-
Then - Actions
- Unit - Set mana of k[2] to ((Mana of k[2]) + 5.20)
- Unit - Set mana of k[1] to ((Mana of k[1]) - 5.20)
- Lightning - Create a Drain Mana lightning effect from source j[2] to target j[1]
- Set t = (Last created lightning effect)
- Wait 0.70 seconds
- Lightning - Destroy t
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_j[2])
-
Loop - Actions
- Custom script: call DestroyGroup(udg_i[1])
- Custom script: call DestroyGroup(udg_i[2])
- Custom script: call DestroyGroup(udg_i[3])
- Custom script: call RemoveLocation(udg_j[1])
-
Loop - Actions
-
Events
Why does "destroy t" not work?
I tried even to set the alpha to 0 to make it invisible but it don't work.