- Joined
- Dec 1, 2010
- Messages
- 346
So for a feature i'm trying to implement i needed to temporarily remove the 'move' function and then add it back later. So i tested both of these in the same trigger. both seperately and in a small test trigger.
The first, unitRemoveAbility correctly removes the move button. However, UnitAddAbility does not add the ability to move back.
Am i missing something in the syntax of UnitAddAbility? I found no documentation about it however i assumed that the same type of syntax would work for it as did for the unitRemoveAbility.
The first, unitRemoveAbility correctly removes the move button. However, UnitAddAbility does not add the ability to move back.
-
Custom script: call UnitRemoveAbility( udg_TempUnit, 'Amov')
-
Custom script: call UnitAddAbility( udg_TempUnit, 'Amov')
-
Movetest copy
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to test (Neutral Hostile)
-
-
Actions
-
Set VariableSet TempUnit = (Casting unit)
-
Custom script: call UnitRemoveAbility( udg_TempUnit, 'Amov')
-
Trigger - Turn on Movetest <gen>
-
Trigger - Turn off (This trigger)
-
-
-
Movetest
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to rotate (Neutral Hostile)
-
-
Actions
-
Set VariableSet TempUnit = (Casting unit)
-
Custom script: call UnitAddAbility( udg_TempUnit, 'Amov')
-
Trigger - Turn on Movetest copy <gen>
-
Trigger - Turn off (This trigger)
-
-
Am i missing something in the syntax of UnitAddAbility? I found no documentation about it however i assumed that the same type of syntax would work for it as did for the unitRemoveAbility.