- Joined
- Nov 30, 2007
- Messages
- 1,202
There are two units involved in this; the Gate (udg_Gate[]) unit and the Rune controling it (u). The locust doesn't get removed so after one go you cant target the gate, perhaps i could just remove it and create a new on the spot but that feels redundant.
-
GateControler Building
-
GateControler Building
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Gate Controler
-
-
Actions
-
Set u = (Triggering unit)
-
Set i = (Custom value of u)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to Open Gate
-
-
Then - Actions
-
Animation - Play Gate_U[i]'s death alternate animation
-
Unit - Remove Open Gate from u
-
Unit - Add Close Gate to u
-
Custom script: call UnitAddAbility( udg_Gate_U[udg_i], 'Aloc')
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to Close Gate
-
-
Then - Actions
-
Animation - Play Gate_U[i]'s stand animation
-
Unit - Remove Close Gate from u
-
Unit - Add Open Gate to u
-
Custom script: call UnitRemoveAbility( udg_Gate_U[udg_i], 'Aloc')
-
-
Else - Actions
-
-
-
-
-
-
Actions
-
Custom script: local unit u = GetTriggerUnit()
-
Custom script: local intiger i = GetUnitUserData(u)
-