- Joined
- Feb 27, 2008
- Messages
- 222
Ok, so i'm trying to create a swap position spell in GUI. Everything works ok with one problem - the cooldown of the spell is not used, meaning you can constantly use it.
I know this is related to the fact that the unit is moved right after casting the spell and the animation isn't finished or that sort of thing. So i was wondering how can i make such a spell where the cooldown will be used?
What i used is above.
I know this is related to the fact that the unit is moved right after casting the spell and the animation isn't finished or that sort of thing. So i was wondering how can i make such a spell where the cooldown will be used?
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Swap [Q]
-
-
Actions
-
Set Loc[1] = (Position of (Target unit of ability being cast))
-
Unit - Create 1 dum for (Owner of (Target unit of ability being cast)) at Loc[1] facing Default building facing degrees
-
Set Loc[1] = (Position of (Casting unit))
-
Unit - Move (Target unit of ability being cast) instantly to Loc[1]
-
Set Loc[1] = (Position of (Last created unit))
-
Unit - Move (Casting unit) instantly to Loc[1]
-
Custom script: call RemoveLocation(udg_Loc[1])
-
What i used is above.