First of all, I'd like to thank everyone who's been here to help. You guys are really good at all this coding, and I give you props for that. Been a really big help to me in my map making.
All these triggers working together make a link between two buildings. The Link transfers mana between the two buildings at a specified rate (1 mana per 1s).
Is there a way to cancel a specific link between buildings? Or at least cancel all links to a specific building.
EDIT: I am in the process of learning JASS. Will take a bit though.
All these triggers working together make a link between two buildings. The Link transfers mana between the two buildings at a specified rate (1 mana per 1s).
-
PT
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


((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 casted[integers[1]]) to target (Position of casting[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
-




Unit - Set mana of casting[integers[2]] to ((Mana of casting[integers[2]]) - 1.00)
-




Unit - Set mana of casted[integers[2]] to ((Mana of casted[integers[2]]) + 1.00)
-




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()))
-
-





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
-
-
Is there a way to cancel a specific link between buildings? Or at least cancel all links to a specific building.
EDIT: I am in the process of learning JASS. Will take a bit though.
Last edited:


