For some reason, my ability's cooldown is being reset when I run the following triggers with it:
Things you should know, a Green Area is a area that the vampires can only access by using this spell, there are 9 of them, when he uses the spell, it teleports him to a Green Area that is being used for 30 seconds then teleports him back to his teleportation rune. (The teleportation rune is just for looks).. the other dummy is basically just the duration). The trigger works, it's just that the ability cooldown resets every time. It resets immediately after he uses the ability.
The spell is based off of taunt.
Things you should know, a Green Area is a area that the vampires can only access by using this spell, there are 9 of them, when he uses the spell, it teleports him to a Green Area that is being used for 30 seconds then teleports him back to his teleportation rune. (The teleportation rune is just for looks).. the other dummy is basically just the duration). The trigger works, it's just that the ability cooldown resets every time. It resets immediately after he uses the ability.
The spell is based off of taunt.
-
Vampire Teleport Ability
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Teleportation Rune
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- GreenAreaTaken[1] Equal to False
- GreenAreaTaken[2] Equal to False
- GreenAreaTaken[3] Equal to False
- GreenAreaTaken[4] Equal to False
- GreenAreaTaken[5] Equal to False
- GreenAreaTaken[6] Equal to False
- GreenAreaTaken[7] Equal to False
- GreenAreaTaken[8] Equal to False
- GreenAreaTaken[9] Equal to False
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Game - Display to (Player group((Owner of (Triggering unit)))) the text: No one controls a G...
- Unit - Remove Teleportation Rune from (Triggering unit)
- Unit - Add Teleportation Rune to (Triggering unit)
- Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + 125.00)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- VampTeleporting[(Player number of (Triggering player))] Equal to True
-
Then - Actions
- Game - Display to (Player group((Owner of (Triggering unit)))) the text: You already have a ...
- Skip remaining actions
-
Else - Actions
- Custom script: loop
- Custom script: exitwhen (udg_VampTeleporting[GetConvertedPlayerId(GetTriggerPlayer())] == true)
- Set RandomInt = (Random integer number between 1 and 9)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- GreenAreaTaken[RandomInt] Equal to True
-
Then - Actions
- Custom script: set udg_VampTeleporting[GetConvertedPlayerId(GetTriggerPlayer())] = true
- Else - Actions
-
If - Conditions
- Custom script: endloop
- Set Point[(Player number of (Triggering player))] = (Position of (Triggering unit))
- Unit - Move (Triggering unit) instantly to (Center of GreenTo[RandomInt])
- Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (Triggering unit)) over 0.50 seconds
- Unit - Create 1 Missile Down for (Owner of (Triggering unit)) at (Position of Builder Difficulty: Easy 0013 <gen>) facing Default building facing degrees
- Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
- Unit - Create 1 Teleportation Rune for (Owner of (Triggering unit)) at Point[(Player number of (Triggering player))] facing Default building facing degrees
- Unit - Add a 31.00 second Generic expiration timer to (Last created unit)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
DummyVamp Dies
-
Events
- Unit - A unit Dies
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Missile Down
-
Actions
-
Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)) of type Vampire) and do (Actions)
-
Loop - Actions
- Unit - Move (Picked unit) instantly to Point[(Player number of (Triggering player))]
- Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (Picked unit)) over 0.50 seconds
- Set VampTeleporting[(Player number of (Triggering player))] = False
- Unit - Remove (Triggering unit) from the game
-
Loop - Actions
-
Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)) of type Vampire) and do (Actions)
-
Events