-
PT
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Transfer Energy (Neutral Hostile)
-
((Triggering unit) is A structure) Equal to True
-
-
Actions
-
Set integers[1] = (integers[1] + 1)
-
Set turnoff[integers[1]] = False
-
Set casting[integers[1]] = (Triggering unit)
-
Set casted[integers[1]] = (Target unit of ability being cast)
-
Lightning - Create a Chain Lightning - Secondary lightning effect from source (Position of casting[integers[1]]) to target (Position of casted[integers[1]])
-
Set lightning[integers[1]] = (Last created lightning effect)
-
Trigger - Turn on loop <gen>
-
-
-
loop
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
turnoff[integers[1]] Equal to False
-
(Mana of casting[integers[1]]) Greater than or equal to 5.00
-
-
Actions
-
For each (Integer integers[2]) from 1 to integers[1], do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
turnoff[integers[2]] Equal to False
-
-
Then - Actions
-
Unit - Set mana of casted[integers[2]] to ((Mana of casted[integers[2]]) + 1.00)
-
Unit - Set mana of casting[integers[2]] to ((Mana of casting[integers[2]]) - 1.00)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
turnoff[integers[2]] Equal to True
-
-
Then - Actions
-
Lightning - Destroy lightning[integers[2]]
-
Custom script: call SetUnitPosition(GetTriggerUnit(), GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()))
-
Set integers[1] = (integers[1] - 1)
-
-
Else - Actions
-
-
-
-
-
-
PTCancel
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Cancel Transfers
-
((Triggering unit) is A structure) Equal to True
-
-
Actions
-
Set turnoff[integers[1]] = True
-
-
I've gotten help from various sources for making those triggers. However I think I need a new one to index who has and who hasn't casted the spell to create a link between two buildings. Someone explained to me that the cancel skill would loop through the index till it finds the same link as the unit who casted the cancel unit.
It sounds perfect. But I have no idea how to do this.
Thanks in advance.