- Joined
- Jul 14, 2011
- Messages
- 3,213
Ok...
If the Repick mode is created later you just disable and destroy the trigger when the repick time is disabled. During the available time for repick, the trigger can be there. As long as you make it impossible to have 2 units of this same unit type, there's no problem.
I repeat it over and over because, if a second unit of this type enters the map, it will overwrite the first one, and the triggers will just work for the second one. But, if you enable repick later, the first one will disappear before a second one becames able to appear, in that case, there's no problem. I'll rework the trigger to make it work for a single unit.

As said before, adjust the "Custom script: if udg_Cooldown == 58 then" to match with your Reincarnation settings. You can also set your Cooldown to whatever you want, even based on the ability level (applying the logic between numbers)
If the Repick mode is created later you just disable and destroy the trigger when the repick time is disabled. During the available time for repick, the trigger can be there. As long as you make it impossible to have 2 units of this same unit type, there's no problem.
I repeat it over and over because, if a second unit of this type enters the map, it will overwrite the first one, and the triggers will just work for the second one. But, if you enable repick later, the first one will disappear before a second one becames able to appear, in that case, there's no problem. I'll rework the trigger to make it work for a single unit.
-
Reincarnation Set
-
Events
-
Unit - A unit enters (Playable map area)
-
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Tauren Chieftain
-
-
Actions
-
Set ReincarnationUnit = (Triggering unit)
-
Set Cooldown = 0
-
Trigger - Turn on Reincarnation Loop <gen>
-
-
-
Reincarnation Loop
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Custom script: set udg_HeroHP = GetUnitState(udg_ReincarnationUnit, UNIT_STATE_LIFE)
-
Custom script: if udg_HeroHP == 0.00 and udg_Cooldown == 0 then
-
Set Cooldown = 60
-
Custom script: endif
-
Custom script: if udg_Cooldown > 0 then
-
Set Cooldown = (Cooldown - 1)
-
Game - Display to (All players) the text: (Cooldown: + (String(Cooldown)))
-
Custom script: else
-
Skip remaining actions
-
Custom script: endif
-
Custom script: if udg_Cooldown == 58 then
-
Unit - Set life of ReincarnationUnit to 25.00%
-
Game - Display to (All players) the text: Life set to 25%
-
Custom script: endif
-
-
As said before, adjust the "Custom script: if udg_Cooldown == 58 then" to match with your Reincarnation settings. You can also set your Cooldown to whatever you want, even based on the ability level (applying the logic between numbers)