Revive Heroes

Level 5
Joined
Jan 23, 2025
Messages
40
Hello again, I'm trying to create a trigger to revive fallen heroes (Dota-style).

While it's probably not the most efficient way, I'm missing a timer that shows how much time is left before the hero can be revived.

1778970471146.webp


If you know of a simple and efficient way (for example, the wait times are incorrect, right?), a test map would be greatly appreciated.

Thanks a lot from this newbie!
 
You will have a problem if 2 heroes dies one after the other because "dying unit" and the wait, hero n°1 will be overwritten by dead hero n°2, so it's probably safer to use "triggering unit" to avoid this issue

Then, "expiring timer" = nothing because it would need an event involving an expiring timer, instead you need to create a timer variable with an array, then you'll be able to start it

  • Countdown Timer - Start ReviveTimer[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in ((Real((Hero level of (Triggering unit)))) + 5.00) seconds
Then you can create a window and show/hide it to who you want

  • Countdown Timer - Create a timer window for ReviveTimer[(Player number of (Owner of (Triggering unit)))] with title Revive in:
  • Countdown Timer - Show (Last created timer window) for Player 1 (Red)
  • Countdown Timer - Hide (Last created timer window) for Player 2 (Blue)
 
If you know of a simple and efficient way (for example, the wait times are incorrect, right?), a test map would be greatly appreciated.

Thanks a lot from this newbie!

This time I created the triggers based on what Chaosium said.

  • Revive Hero Step 01 of 02
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • ((Dying unit) is an illusion) Equal to False
    • Actions
      • Set ReviveHeroIndex = 0
      • Set TempUnit = (Triggering unit)
      • For each (Integer TempLoop) from 1 to ReviveHeroIndexMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ReviveHeroUnitArray[TempLoop] Equal to TempUnit
            • Then - Actions
              • Set ReviveHeroIndex = TempLoop
              • Custom script: exitwhen true
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReviveHeroIndex Equal to 0
        • Then - Actions
          • Set ReviveHeroIndexMax = (ReviveHeroIndexMax + 1)
          • Set ReviveHeroIndex = ReviveHeroIndexMax
          • Set ReviveHeroUnitArray[ReviveHeroIndex] = TempUnit
          • Set TempTrigger = Revive Hero Step 02 of 02 <gen>
          • Trigger - Add to TempTrigger the event (Time - ReviveHeroTimerArray[ReviveHeroIndex] expires)
          • Countdown Timer - Create a timer window for ReviveHeroTimerArray[ReviveHeroIndex] with title (Revive in: + (Name of ReviveHeroUnitArray[ReviveHeroIndex]))
          • Set ReviveHeroTimerWindowArray[ReviveHeroIndex] = (Last created timer window)
          • Custom script: set udg_TempTrigger = null
        • Else - Actions
      • Game - Display to (All players) for 5.00 seconds the text: ((Name of ReviveHeroUnitArray[ReviveHeroIndex]) + (: Index + (String(ReviveHeroIndex))))
      • Custom script: set udg_LocalPlayer = GetLocalPlayer()
      • Set TempPlayer = (Owner of ReviveHeroUnitArray[ReviveHeroIndex])
      • Set ReviveHeroTime = ((Real((Hero level of ReviveHeroUnitArray[ReviveHeroIndex]))) + 5.00)
      • Countdown Timer - Start ReviveHeroTimerArray[ReviveHeroIndex] as a One-shot timer that will expire in ReviveHeroTime seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • LocalPlayer Equal to TempPlayer
        • Then - Actions
          • Countdown Timer - Show ReviveHeroTimerWindowArray[ReviveHeroIndex]
        • Else - Actions
          • Countdown Timer - Hide ReviveHeroTimerWindowArray[ReviveHeroIndex]
      • Set TempUnit = No unit
      • Custom script: set udg_LocalPlayer = null
      • Custom script: set udg_TempPlayer = null

  • Revive Hero Step 02 of 02
    • Events
    • Conditions
    • Actions
      • Set TempTimer = (Expiring timer)
      • For each (Integer TempLoop) from 1 to ReviveHeroIndexMax, do (Actions)
        • Loop - Actions
          • Custom script: if udg_TempTimer == udg_ReviveHeroTimerArray[udg_TempLoop] then
          • Set TempPlayer = (Owner of ReviveHeroUnitArray[TempLoop])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player number of TempPlayer) Greater than or equal to 1
              • (Player number of TempPlayer) Less than or equal to 4
            • Then - Actions
              • Set TempPoint = (Center of ReviveAlliance <gen>)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player number of TempPlayer) Greater than or equal to 5
              • (Player number of TempPlayer) Less than or equal to 8
            • Then - Actions
              • Set TempPoint = (Center of ReviveHorde <gen>)
            • Else - Actions
          • Hero - Instantly revive ReviveHeroUnitArray[TempLoop] at TempPoint, Show revival graphics
          • Unit - Set mana of ReviveHeroUnitArray[TempLoop] to (Max mana of ReviveHeroUnitArray[TempLoop])
          • Countdown Timer - Hide ReviveHeroTimerWindowArray[TempLoop]
          • Selection - Add ReviveHeroUnitArray[TempLoop] to selection for TempPlayer
          • Game - Display to (All players) for 5.00 seconds the text: ((Name of ReviveHeroUnitArray[TempLoop]) + (: Index + (String(TempLoop))))
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: set udg_TempPoint = null
          • Custom script: set udg_TempPlayer = null
          • Custom script: set udg_TempTimer = null
          • Custom script: exitwhen true
          • Custom script: endif

The main action you should take is to define the TempPoint variable in step 02 as needed in your map (Center of ReviveAlliance or ReviveHorde).
 

Attachments

Hi! I'm having trouble with the clock window, and I don't know why.

After many attempts and consulting other maps, this is the solution that works best for me.

1779034729114.webp



1779034778627.webp


Remember to set the hero's food capacity to 0. Thank you very much guys.
 
Hi! I'm having trouble with the clock window, and I don't know why.

After many attempts and consulting other maps, this is the solution that works best for me.

This method does unnecessary stuff, has memory leaks, can cause desync and doesn't take into account what Chaosium said here.

I updated the triggers and the test map.

  • Revive Hero Step 01 of 02 Updated
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) is an illusion) Equal to False
      • (Player number of (Owner of (Triggering unit))) Greater than or equal to 1
      • (Player number of (Owner of (Triggering unit))) Less than or equal to 8
    • Actions
      • Set ReviveHeroIndex = 0
      • Set TempUnit = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReviveHeroIndexMax Greater than 0
        • Then - Actions
          • For each (Integer TempLoop) from 1 to ReviveHeroIndexMax, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ReviveHeroUnitArray[TempLoop] Equal to TempUnit
                • Then - Actions
                  • Set ReviveHeroIndex = TempLoop
                • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReviveHeroIndex Equal to 0
        • Then - Actions
          • Set ReviveHeroIndexMax = (ReviveHeroIndexMax + 1)
          • Set ReviveHeroIndex = ReviveHeroIndexMax
          • Set ReviveHeroUnitArray[ReviveHeroIndex] = TempUnit
          • Set TempTrigger = Revive Hero Step 02 of 02 Updated <gen>
          • Trigger - Add to TempTrigger the event (Time - ReviveHeroTimerArray[ReviveHeroIndex] expires)
          • Countdown Timer - Create a timer window for ReviveHeroTimerArray[ReviveHeroIndex] with title (Revive: + (Name of ReviveHeroUnitArray[ReviveHeroIndex]))
          • Set ReviveHeroTimerWindowArray[ReviveHeroIndex] = (Last created timer window)
          • Custom script: set udg_TempTrigger = null
        • Else - Actions
      • Game - Display to (All players) for 5.00 seconds the text: (Index + ((String(ReviveHeroIndex)) + (: + ((Name of ReviveHeroUnitArray[ReviveHeroIndex]) + Died))))
      • Set ReviveHeroTime = ((Real((Hero level of ReviveHeroUnitArray[ReviveHeroIndex]))) + 5.00)
      • Countdown Timer - Start ReviveHeroTimerArray[ReviveHeroIndex] as a One-shot timer that will expire in ReviveHeroTime seconds
      • Custom script: set udg_LocalPlayer = GetLocalPlayer()
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ReviveHeroUnitArray[ReviveHeroIndex] belongs to an ally of LocalPlayer) Equal to True
        • Then - Actions
          • Countdown Timer - Show ReviveHeroTimerWindowArray[ReviveHeroIndex]
        • Else - Actions
          • Countdown Timer - Hide ReviveHeroTimerWindowArray[ReviveHeroIndex]
      • Set TempUnit = No unit
      • Custom script: set udg_LocalPlayer = null

  • Revive Hero Step 02 of 02 Updated
    • Events
    • Conditions
    • Actions
      • Set TempTimer = (Expiring timer)
      • For each (Integer TempLoop) from 1 to ReviveHeroIndexMax, do (Actions)
        • Loop - Actions
          • Custom script: if udg_TempTimer == udg_ReviveHeroTimerArray[udg_TempLoop] then
          • Set TempPlayer = (Owner of ReviveHeroUnitArray[TempLoop])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player number of TempPlayer) Greater than or equal to 1
              • (Player number of TempPlayer) Less than or equal to 4
            • Then - Actions
              • Set TempPoint = (Center of ReviveAlliance <gen>)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player number of TempPlayer) Greater than or equal to 5
              • (Player number of TempPlayer) Less than or equal to 8
            • Then - Actions
              • Set TempPoint = (Center of ReviveHorde <gen>)
            • Else - Actions
          • Hero - Instantly revive ReviveHeroUnitArray[TempLoop] at TempPoint, Show revival graphics
          • Unit - Set mana of ReviveHeroUnitArray[TempLoop] to (Max mana of ReviveHeroUnitArray[TempLoop])
          • Countdown Timer - Hide ReviveHeroTimerWindowArray[TempLoop]
          • Camera - Pan camera for TempPlayer to TempPoint over 0.00 seconds
          • Selection - Add ReviveHeroUnitArray[TempLoop] to selection for TempPlayer
          • Game - Display to (All players) for 5.00 seconds the text: (Index + ((String(TempLoop)) + (: + ((Name of ReviveHeroUnitArray[TempLoop]) + Revived))))
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: set udg_TempPoint = null
          • Custom script: set udg_TempPlayer = null
          • Custom script: set udg_TempTimer = null
          • Custom script: endif
      • Custom script: set udg_TempTimer = null



 

Attachments

  • Revive Hero Step 01 of 02 Updated
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to Verdadero
      • ((Triggering unit) is an illusion) Equal to Falso
      • (Player number of (Owner of (Triggering unit))) Greater than or equal to 1
      • (Player number of (Owner of (Triggering unit))) Less than or equal to 14
    • Actions
      • Set VariableSet ReviveHeroIndex = 0
      • Set VariableSet TempUnit = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReviveHeroIndexMax Greater than 0
        • Then - Actions
          • For each (Integer TempLoop) from 1 to ReviveHeroIndexMax, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ReviveHeroUnitArray[TempLoop] Equal to TempUnit
                • Then - Actions
                  • Set VariableSet ReviveHeroIndex = TempLoop
                • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReviveHeroIndex Equal to 0
        • Then - Actions
          • Set VariableSet ReviveHeroIndexMax = (ReviveHeroIndexMax + 1)
          • Set VariableSet ReviveHeroIndex = ReviveHeroIndexMax
          • Set VariableSet ReviveHeroUnitArray[ReviveHeroIndex] = TempUnit
          • Set VariableSet TempTrigger = Revive Hero Step 02 of 02 Updated <gen>
          • Trigger - Add to TempTrigger the event (Time - ReviveHeroTimerArray[ReviveHeroIndex] expires)
          • Countdown Timer - Create a timer window for ReviveHeroTimerArray[ReviveHeroIndex] with title (Revive: + (Name of ReviveHeroUnitArray[ReviveHeroIndex]))
          • Set VariableSet ReviveHeroTimerWindowArray[ReviveHeroIndex] = (Last created timer window)
          • Custom script: set udg_TempTrigger = null
        • Else - Actions
      • Set VariableSet ReviveHeroTime = ((Real((Hero level of ReviveHeroUnitArray[ReviveHeroIndex]))) + 5.00)
      • Countdown Timer - Start ReviveHeroTimerArray[ReviveHeroIndex] as a One-shot timer that will expire in ReviveHeroTime seconds
      • Custom script: set udg_LocalPlayer = GetLocalPlayer()
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ReviveHeroUnitArray[ReviveHeroIndex] belongs to an ally of LocalPlayer.) Equal to Verdadero
        • Then - Actions
          • Countdown Timer - Show ReviveHeroTimerWindowArray[ReviveHeroIndex]
        • Else - Actions
          • Countdown Timer - Hide ReviveHeroTimerWindowArray[ReviveHeroIndex]
      • Set VariableSet TempUnit = No unit
      • Custom script: set udg_LocalPlayer = null
  • Revive Hero Step 02 of 02 Updated
    • Events
    • Conditions
    • Actions
      • Set VariableSet TempTimer = (Expiring timer)
      • For each (Integer TempLoop) from 1 to ReviveHeroIndexMax, do (Actions)
        • Loop - Actions
          • Custom script: if udg_TempTimer == udg_ReviveHeroTimerArray[udg_TempLoop] then
          • Set VariableSet TempPlayer = (Owner of ReviveHeroUnitArray[TempLoop])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player number of TempPlayer) Equal to 3
              • (Player number of TempPlayer) Equal to 4
              • (Player number of TempPlayer) Equal to 5
              • (Player number of TempPlayer) Equal to 14
            • Then - Actions
              • Set VariableSet TempPoint = (Center of REVIVE HU <gen>)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player number of TempPlayer) Equal to 6
              • (Player number of TempPlayer) Equal to 7
              • (Player number of TempPlayer) Equal to 8
              • (Player number of TempPlayer) Equal to 13
            • Then - Actions
              • Set VariableSet TempPoint = (Center of REVIVE ORC <gen>)
            • Else - Actions
          • Hero - Instantly revive ReviveHeroUnitArray[TempLoop] at TempPoint, Show revival graphics
          • Unit - Set mana of ReviveHeroUnitArray[TempLoop] to (Max mana of ReviveHeroUnitArray[TempLoop])
          • Countdown Timer - Hide ReviveHeroTimerWindowArray[TempLoop]
          • Camera - Pan camera for TempPlayer to TempPoint over 0.00 seconds
          • Selection - Add ReviveHeroUnitArray[TempLoop] to selection for TempPlayer
          • Game - Display to (All players) for 5.00 seconds the text: (Index + ((String(TempLoop)) + (: + ((Name of ReviveHeroUnitArray[TempLoop]) + Revived))))
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: set udg_TempPoint = null
          • Custom script: set udg_TempPlayer = null
          • Custom script: set udg_TempTimer = null
          • Custom script: endif
      • Custom script: set udg_TempTimer = null
  • [TRIGGER]

The map has two teams.

Team 1: The computer is player 2, and players 3, 4, 5, and 14 are users.

Team 2: The computer is player 1, and players 6, 7, 8, and 13 are users.

What bugs are there?

- My hero never respawns when they die.

- The countdown timer window is visible. But when the timer reaches zero, the camera takes you to the center of the game instead of the respawn zone.

- Allies also don't respawn when they die.

- Their timer window is visible, but no numbers appear, and the screen doesn't disappear.

It's strange because your test map works perfectly; I don't know where the bugs are, man.
 
The map has two teams.

Team 1: The computer is player 2, and players 3, 4, 5, and 14 are users.

Team 2: The computer is player 1, and players 6, 7, 8, and 13 are users.

What bugs are there?

- My hero never respawns when they die.

- The countdown timer window is visible. But when the timer reaches zero, the camera takes you to the center of the game instead of the respawn zone.

- Allies also don't respawn when they die.

- Their timer window is visible, but no numbers appear, and the screen doesn't disappear.

It's strange because your test map works perfectly; I don't know where the bugs are, man.

You missed the OR Condition block in the second trigger.

  • Revive Hero Step 02 of 02 Updated Copy
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Player number of TempPlayer) Equal to 3
              • (Player number of TempPlayer) Equal to 4
              • (Player number of TempPlayer) Equal to 5
              • (Player number of TempPlayer) Equal to 14
        • Then - Actions
          • Set TempPoint = (Center of REVIVE HU <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Player number of TempPlayer) Equal to 6
              • (Player number of TempPlayer) Equal to 7
              • (Player number of TempPlayer) Equal to 8
              • (Player number of TempPlayer) Equal to 13
        • Then - Actions
          • Set TempPoint = (Center of REVIVE ORC <gen>)
        • Else - Actions
This might not solve the problem, but it will give a clue as to what's going on.

I also noticed that you removed the debug message in the first trigger. It's important to understand which issues is in the trigger. Please, disable instead of deleting when you are not going to use it.

Anyway, what do the debug messages show in the steps 01 and 02?
 
Did you enable fixed player settings in Scenario > Forces?
yes

You missed the OR Condition block in the second trigger.

  • Revive Hero Step 02 of 02 Updated Copy
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Player number of TempPlayer) Equal to 3
              • (Player number of TempPlayer) Equal to 4
              • (Player number of TempPlayer) Equal to 5
              • (Player number of TempPlayer) Equal to 14
        • Then - Actions
          • Set TempPoint = (Center of REVIVE HU <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Player number of TempPlayer) Equal to 6
              • (Player number of TempPlayer) Equal to 7
              • (Player number of TempPlayer) Equal to 8
              • (Player number of TempPlayer) Equal to 13
        • Then - Actions
          • Set TempPoint = (Center of REVIVE ORC <gen>)
        • Else - Actions
This might not solve the problem, but it will give a clue as to what's going on.

I also noticed that you removed the debug message in the first trigger. It's important to understand which issues is in the trigger. Please, disable instead of deleting when you are not going to use it.

Anyway, what do the debug messages show in the steps 01 and 02?

  • Revive Hero Step 02 of 02 Updated
    • Events
    • Conditions
    • Actions
      • Set VariableSet TempTimer = (Expiring timer)
      • For each (Integer TempLoop) from 1 to ReviveHeroIndexMax, do (Actions)
        • Loop - Actions
          • Custom script: if udg_TempTimer == udg_ReviveHeroTimerArray[udg_TempLoop] then
          • Set VariableSet TempPlayer = (Owner of ReviveHeroUnitArray[TempLoop])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Player number of TempPlayer) Equal to 3
                  • (Player number of TempPlayer) Equal to 4
                  • (Player number of TempPlayer) Equal to 5
                  • (Player number of TempPlayer) Equal to 3
            • Then - Actions
              • Set VariableSet TempPoint = (Center of REVIVE HU <gen>)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Player number of TempPlayer) Equal to 6
                  • (Player number of TempPlayer) Equal to 7
                  • (Player number of TempPlayer) Equal to 8
                  • (Player number of TempPlayer) Equal to 13
            • Then - Actions
              • Set VariableSet TempPoint = (Center of REVIVE ORC <gen>)
            • Else - Actions
          • Hero - Instantly revive ReviveHeroUnitArray[TempLoop] at TempPoint, Show revival graphics
          • Unit - Set mana of ReviveHeroUnitArray[TempLoop] to (Max mana of ReviveHeroUnitArray[TempLoop])
          • Countdown Timer - Hide ReviveHeroTimerWindowArray[TempLoop]
          • Camera - Pan camera for TempPlayer to TempPoint over 0.00 seconds
          • Selection - Add ReviveHeroUnitArray[TempLoop] to selection for TempPlayer
          • Game - Display to (All players) for 5.00 seconds the text: (Index + ((String(TempLoop)) + (: + ((Name of ReviveHeroUnitArray[TempLoop]) + Revived))))
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: set udg_TempPoint = null
          • Custom script: set udg_TempPlayer = null
          • Custom script: set udg_TempTimer = null
          • Custom script: endif
      • Custom script: set udg_TempTimer = null
Now my hero is back to life, with the camera in the right place.

But the same problems persist with the allies.

1779102855589.webp



1779102955430.webp
 
Now my hero is back to life, with the camera in the right place.

But the same problems persist with the allies.
I think I know what the problem is. Probably values of some global variables are overlaped while triggers running. The global variables TempPlayer, TempTrigger, and TempLoop are also used in Kill Streaks. This isn't always a problem, but in this case it seems like it is.

As soon as I can access my personal computer, I will update the triggers and the test map again so that the Revive Heroes process uses unique global variables.
 
Last edited:
I think I know what the problem is. Probably values of some global variables are overlaped while triggers running. The global variables TempPlayer, TempTrigger, and TempLoop are also used in Kill Streaks. This isn't always a problem, but in this case it seems like it is.

As soon as I can access my personal computer, I will update the triggers and the test map again so that the Revive Heroes process uses unique global variables.
Hi! Perfect. I'm eagerly awaiting the map. I'm on vacation for a week; I'll download it when I get back.
Thank you so much.
 
Hi! Perfect. I'm eagerly awaiting the map. I'm on vacation for a week; I'll download it when I get back.
Thank you so much.

Nice! Have a great vacation!

  • Revive Hero Step 01 of 02 Updated2
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) is an illusion) Equal to False
      • Or - Any (Conditions) are true
        • Conditions
          • (Player number of (Owner of (Triggering unit))) Equal to 3
          • (Player number of (Owner of (Triggering unit))) Equal to 4
          • (Player number of (Owner of (Triggering unit))) Equal to 5
          • (Player number of (Owner of (Triggering unit))) Equal to 6
          • (Player number of (Owner of (Triggering unit))) Equal to 7
          • (Player number of (Owner of (Triggering unit))) Equal to 8
          • (Player number of (Owner of (Triggering unit))) Equal to 13
          • (Player number of (Owner of (Triggering unit))) Equal to 14
    • Actions
      • Set ReviveHeroIndex = 0
      • Set ReviveHeroUnit = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReviveHeroIndexMax Greater than 0
        • Then - Actions
          • For each (Integer ReviveHeroLoop1) from 1 to ReviveHeroIndexMax, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ReviveHeroUnitArray[ReviveHeroLoop1] Equal to ReviveHeroUnit
                • Then - Actions
                  • Set ReviveHeroIndex = ReviveHeroLoop1
                  • Custom script: exitwhen true
                • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReviveHeroIndex Equal to 0
        • Then - Actions
          • Set ReviveHeroIndexMax = (ReviveHeroIndexMax + 1)
          • Set ReviveHeroIndex = ReviveHeroIndexMax
          • Set ReviveHeroUnitArray[ReviveHeroIndex] = ReviveHeroUnit
          • Set ReviveHeroTrigger = Revive Hero Step 02 of 02 Updated2 <gen>
          • Trigger - Add to ReviveHeroTrigger the event (Time - ReviveHeroTimerArray[ReviveHeroIndex] expires)
          • Countdown Timer - Create a timer window for ReviveHeroTimerArray[ReviveHeroIndex] with title (Revive: + (Name of ReviveHeroUnitArray[ReviveHeroIndex]))
          • Set ReviveHeroTimerWindowArray[ReviveHeroIndex] = (Last created timer window)
          • Custom script: set udg_ReviveHeroTrigger = null
        • Else - Actions
      • Game - Display to (All players) for 5.00 seconds the text: (Index + ((String(ReviveHeroIndex)) + (: + ((Name of ReviveHeroUnitArray[ReviveHeroIndex]) + Died))))
      • Set ReviveHeroTime = ((Real((Hero level of ReviveHeroUnitArray[ReviveHeroIndex]))) + 5.00)
      • Countdown Timer - Start ReviveHeroTimerArray[ReviveHeroIndex] as a One-shot timer that will expire in ReviveHeroTime seconds
      • Custom script: set udg_ReviveHeroLocalPlayer = GetLocalPlayer()
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ReviveHeroUnitArray[ReviveHeroIndex] belongs to an ally of ReviveHeroLocalPlayer) Equal to True
        • Then - Actions
          • Countdown Timer - Show ReviveHeroTimerWindowArray[ReviveHeroIndex]
        • Else - Actions
          • Countdown Timer - Hide ReviveHeroTimerWindowArray[ReviveHeroIndex]
      • Custom script: set udg_ReviveHeroLocalPlayer = null
      • Set ReviveHeroUnit = No unit

  • Revive Hero Step 02 of 02 Updated2
    • Events
    • Conditions
    • Actions
      • Set ReviveHeroTimer = (Expiring timer)
      • For each (Integer ReviveHeroLoop2) from 1 to ReviveHeroIndexMax, do (Actions)
        • Loop - Actions
          • Custom script: if udg_ReviveHeroTimerArray[udg_ReviveHeroLoop2] == udg_ReviveHeroTimer then
          • Set ReviveHeroPlayer = (Owner of ReviveHeroUnitArray[ReviveHeroLoop2])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Player number of ReviveHeroPlayer) Equal to 3
                  • (Player number of ReviveHeroPlayer) Equal to 4
                  • (Player number of ReviveHeroPlayer) Equal to 5
                  • (Player number of ReviveHeroPlayer) Equal to 14
            • Then - Actions
              • Set ReviveHeroPoint = (Center of REVIVE HU <gen>)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Player number of ReviveHeroPlayer) Equal to 6
                  • (Player number of ReviveHeroPlayer) Equal to 7
                  • (Player number of ReviveHeroPlayer) Equal to 8
                  • (Player number of ReviveHeroPlayer) Equal to 13
            • Then - Actions
              • Set ReviveHeroPoint = (Center of REVIVE ORC <gen>)
            • Else - Actions
          • Hero - Instantly revive ReviveHeroUnitArray[ReviveHeroLoop2] at ReviveHeroPoint, Show revival graphics
          • Unit - Set mana of ReviveHeroUnitArray[ReviveHeroLoop2] to (Max mana of ReviveHeroUnitArray[ReviveHeroLoop2])
          • Countdown Timer - Hide ReviveHeroTimerWindowArray[ReviveHeroLoop2]
          • Camera - Pan camera for ReviveHeroPlayer to ReviveHeroPoint over 0.00 seconds
          • Selection - Add ReviveHeroUnitArray[ReviveHeroLoop2] to selection for ReviveHeroPlayer
          • Game - Display to (All players) for 5.00 seconds the text: (Index + ((String(ReviveHeroLoop2)) + (: + ((Name of ReviveHeroUnitArray[ReviveHeroLoop2]) + Revived))))
          • Custom script: call RemoveLocation(udg_ReviveHeroPoint)
          • Custom script: set udg_ReviveHeroPoint = null
          • Custom script: set udg_ReviveHeroPlayer = null
          • Custom script: exitwhen true
          • Custom script: endif
      • Custom script: set udg_ReviveHeroTimer = null

I'm thinking of updating the triggers related to Kill Streaks, since the same problem might occur with them. What do you think about that?
 

Attachments

Nice! Have a great vacation!

  • Revive Hero Step 01 of 02 Updated2
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) is an illusion) Equal to False
      • Or - Any (Conditions) are true
        • Conditions
          • (Player number of (Owner of (Triggering unit))) Equal to 3
          • (Player number of (Owner of (Triggering unit))) Equal to 4
          • (Player number of (Owner of (Triggering unit))) Equal to 5
          • (Player number of (Owner of (Triggering unit))) Equal to 6
          • (Player number of (Owner of (Triggering unit))) Equal to 7
          • (Player number of (Owner of (Triggering unit))) Equal to 8
          • (Player number of (Owner of (Triggering unit))) Equal to 13
          • (Player number of (Owner of (Triggering unit))) Equal to 14
    • Actions
      • Set ReviveHeroIndex = 0
      • Set ReviveHeroUnit = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReviveHeroIndexMax Greater than 0
        • Then - Actions
          • For each (Integer ReviveHeroLoop1) from 1 to ReviveHeroIndexMax, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ReviveHeroUnitArray[ReviveHeroLoop1] Equal to ReviveHeroUnit
                • Then - Actions
                  • Set ReviveHeroIndex = ReviveHeroLoop1
                  • Custom script: exitwhen true
                • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReviveHeroIndex Equal to 0
        • Then - Actions
          • Set ReviveHeroIndexMax = (ReviveHeroIndexMax + 1)
          • Set ReviveHeroIndex = ReviveHeroIndexMax
          • Set ReviveHeroUnitArray[ReviveHeroIndex] = ReviveHeroUnit
          • Set ReviveHeroTrigger = Revive Hero Step 02 of 02 Updated2 <gen>
          • Trigger - Add to ReviveHeroTrigger the event (Time - ReviveHeroTimerArray[ReviveHeroIndex] expires)
          • Countdown Timer - Create a timer window for ReviveHeroTimerArray[ReviveHeroIndex] with title (Revive: + (Name of ReviveHeroUnitArray[ReviveHeroIndex]))
          • Set ReviveHeroTimerWindowArray[ReviveHeroIndex] = (Last created timer window)
          • Custom script: set udg_ReviveHeroTrigger = null
        • Else - Actions
      • Game - Display to (All players) for 5.00 seconds the text: (Index + ((String(ReviveHeroIndex)) + (: + ((Name of ReviveHeroUnitArray[ReviveHeroIndex]) + Died))))
      • Set ReviveHeroTime = ((Real((Hero level of ReviveHeroUnitArray[ReviveHeroIndex]))) + 5.00)
      • Countdown Timer - Start ReviveHeroTimerArray[ReviveHeroIndex] as a One-shot timer that will expire in ReviveHeroTime seconds
      • Script personalizado: establecer udg_ReviveHeroLocalPlayer = GetLocalPlayer()
      • Si (Todas las condiciones son verdaderas) entonces haz (Acciones de entonces) de lo contrario haz (Acciones de otro modo)
        • Si - Condiciones
          • (ReviveHeroUnitArray[ReviveHeroIndex] pertenece a un aliado de ReviveHeroLocalPlayer) Igual a Verdadero
        • Entonces - Acciones
          • Temporizador de cuenta regresiva - Mostrar ReviveHeroTimerWindowArray[ReviveHeroIndex]
        • De lo contrario - Acciones
          • Temporizador de cuenta regresiva - Ocultar ReviveHeroTimerWindowArray[ReviveHeroIndex]
      • Script personalizado: establecer udg_ReviveHeroLocalPlayer = null
      • Establecer ReviveHeroUnit = Ninguna unidad
  • [/DESENCADENAR]
  • [/SPOILER]
  • [SPOILER="Revivir héroe Paso 02 de 02 Actualizado2"]
  • [DESENCADENAR]
  • Revivir héroe Paso 02 de 02 Actualizado2
    • Eventos
    • Condiciones
    • Comportamiento
      • Establecer ReviveHeroTimer = (Temporizador que expira)
      • Para cada (Integer ReviveHeroLoop2) desde 1 hasta ReviveHeroIndexMax, haga (Acciones)
        • Bucle - Acciones
          • Script personalizado: si udg_ReviveHeroTimerArray[udg_ReviveHeroLoop2] == udg_ReviveHeroTimer entonces
          • Establecer ReviveHeroPlayer = (Propietario de ReviveHeroUnitArray[ReviveHeroLoop2])
          • Si (Todas las condiciones son verdaderas) entonces haz (Acciones de entonces) de lo contrario haz (Acciones de otro modo)
            • Si - Condiciones
              • O bien - Cualquiera de las (Condiciones) es verdadera
                • Condiciones
                  • (Número de jugador de ReviveHeroPlayer) Igual a 3
                  • (Número de jugador de ReviveHeroPlayer) Igual a 4
                  • (Número de jugador de ReviveHeroPlayer) Igual a 5
                  • (Número de jugador de ReviveHeroPlayer) Igual a 14
            • Entonces - Acciones
              • Establecer ReviveHeroPoint = (Centro de REVIVE HU <gen>)
            • De lo contrario - Acciones
          • Si (Todas las condiciones son verdaderas) entonces haz (Acciones de entonces) de lo contrario haz (Acciones de otro modo)
            • Si - Condiciones
              • O bien - Cualquiera de las (Condiciones) es verdadera
                • Condiciones
                  • (Número de jugador de ReviveHeroPlayer) Igual a 6
                  • (Número de jugador de ReviveHeroPlayer) Igual a 7
                  • (Número de jugador de ReviveHeroPlayer) Igual a 8
                  • (Número de jugador de ReviveHeroPlayer) Igual a 13
            • Entonces - Acciones
              • Establecer ReviveHeroPoint = (Centro de REVIVE ORC <gen>)
            • De lo contrario - Acciones
          • Héroe: revive instantáneamente ReviveHeroUnitArray[ReviveHeroLoop2] en ReviveHeroPoint, muestra los gráficos de resurrección.
          • Unidad - Establece el maná de ReviveHeroUnitArray[ReviveHeroLoop2] a (Maná máximo de ReviveHeroUnitArray[ReviveHeroLoop2])
          • Temporizador de cuenta regresiva - Ocultar ReviveHeroTimerWindowArray[ReviveHeroLoop2]
          • Cámara: mueva la cámara para ReviveHeroPlayer a ReviveHeroPoint durante 0,00 segundos.
          • Selección: agregue ReviveHeroUnitArray[ReviveHeroLoop2] a la selección para ReviveHeroPlayer
          • Juego - Mostrar a (Todos los jugadores) durante 5.00 segundos el texto: (Índice + ((Cadena(ReviveHeroLoop2)) + (: + ((Nombre de ReviveHeroUnitArray[ReviveHeroLoop2]) + Revivido))))
          • Script personalizado: llamar a RemoveLocation(udg_ReviveHeroPoint)
          • Script personalizado: establecer udg_ReviveHeroPoint = null
          • Script personalizado: establecer udg_ReviveHeroPlayer = null
          • Script personalizado: exitwhen true
          • Script personalizado: endif
      • Script personalizado: establecer udg_ReviveHeroTimer = null
  • [/DESENCADENAR]
  • [/SPOILER]
  • Estoy pensando en actualizar los activadores relacionados con las rachas de bajas, ya que podría ocurrir el mismo problema con ellas. ¿Qué opinas?
  • [/QUOTE]
Hi! Killstreaks work well (I think).

If you think it can be done more effectively, go ahead.

Thanks as always.
 
why do you start a timer if you dont use it ? also you start (expiring timer) which is not a timer object , but an event response. using wait for reviving hero is bad practice.

in the etrigger edtiro press ctrl+B to call the variable windows, and create a variable of type Timer, Timer Window, Unit, Point

  • create timer windows
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Countdown Timer - Create a timer window for timer[(Integer A)] with title Respawn:
          • Set timer_w[(Integer A)] = (Last created timer window)
          • Countdown Timer - Hide (Last created timer window)
  • unit dies event
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set playerNum = (Player number of (Owner of (Triggering unit)))
      • Set timer_checked[playerNum] = False
      • Countdown Timer - Start timer[playerNum] as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Show timer_w[playerNum] for (Player(playerNum))
  • check timers loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • timer_checked[(Integer A)] Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Remaining time for timer[(Integer A)]) Equal to 0.00
                • Then - Actions
                  • Set timer_checked[playerNum] = True
                  • Countdown Timer - Hide timer_w[(Integer A)]
                  • Hero - Instantly revive Hero[(Integer A)] at ReviveLoc[(Integer A)], Show revival graphics
                  • Selection - Select Hero[playerNum] for (Player(playerNum))
                  • Camera - Pan camera for (Player(playerNum)) to ReviveLoc[playerNum] over 0.00 seconds
                • Else - Actions
            • Else - Actions
 
Nice! Have a great vacation!

  • Revive Hero Step 01 of 02 Updated2
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) is an illusion) Equal to False
      • Or - Any (Conditions) are true
        • Conditions
          • (Player number of (Owner of (Triggering unit))) Equal to 3
          • (Player number of (Owner of (Triggering unit))) Equal to 4
          • (Player number of (Owner of (Triggering unit))) Equal to 5
          • (Player number of (Owner of (Triggering unit))) Equal to 6
          • (Player number of (Owner of (Triggering unit))) Equal to 7
          • (Player number of (Owner of (Triggering unit))) Equal to 8
          • (Player number of (Owner of (Triggering unit))) Equal to 13
          • (Player number of (Owner of (Triggering unit))) Equal to 14
    • Actions
      • Set ReviveHeroIndex = 0
      • Set ReviveHeroUnit = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReviveHeroIndexMax Greater than 0
        • Then - Actions
          • For each (Integer ReviveHeroLoop1) from 1 to ReviveHeroIndexMax, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ReviveHeroUnitArray[ReviveHeroLoop1] Equal to ReviveHeroUnit
                • Then - Actions
                  • Set ReviveHeroIndex = ReviveHeroLoop1
                  • Custom script: exitwhen true
                • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ReviveHeroIndex Equal to 0
        • Then - Actions
          • Set ReviveHeroIndexMax = (ReviveHeroIndexMax + 1)
          • Set ReviveHeroIndex = ReviveHeroIndexMax
          • Set ReviveHeroUnitArray[ReviveHeroIndex] = ReviveHeroUnit
          • Set ReviveHeroTrigger = Revive Hero Step 02 of 02 Updated2 <gen>
          • Trigger - Add to ReviveHeroTrigger the event (Time - ReviveHeroTimerArray[ReviveHeroIndex] expires)
          • Countdown Timer - Create a timer window for ReviveHeroTimerArray[ReviveHeroIndex] with title (Revive: + (Name of ReviveHeroUnitArray[ReviveHeroIndex]))
          • Set ReviveHeroTimerWindowArray[ReviveHeroIndex] = (Last created timer window)
          • Custom script: set udg_ReviveHeroTrigger = null
        • Else - Actions
      • Game - Display to (All players) for 5.00 seconds the text: (Index + ((String(ReviveHeroIndex)) + (: + ((Name of ReviveHeroUnitArray[ReviveHeroIndex]) + Died))))
      • Set ReviveHeroTime = ((Real((Hero level of ReviveHeroUnitArray[ReviveHeroIndex]))) + 5.00)
      • Countdown Timer - Start ReviveHeroTimerArray[ReviveHeroIndex] as a One-shot timer that will expire in ReviveHeroTime seconds
      • Custom script: set udg_ReviveHeroLocalPlayer = GetLocalPlayer()
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ReviveHeroUnitArray[ReviveHeroIndex] belongs to an ally of ReviveHeroLocalPlayer) Equal to True
        • Then - Actions
          • Countdown Timer - Show ReviveHeroTimerWindowArray[ReviveHeroIndex]
        • Else - Actions
          • Countdown Timer - Hide ReviveHeroTimerWindowArray[ReviveHeroIndex]
      • Custom script: set udg_ReviveHeroLocalPlayer = null
      • Set ReviveHeroUnit = No unit

  • Revive Hero Step 02 of 02 Updated2
    • Events
    • Conditions
    • Actions
      • Set ReviveHeroTimer = (Expiring timer)
      • For each (Integer ReviveHeroLoop2) from 1 to ReviveHeroIndexMax, do (Actions)
        • Loop - Actions
          • Custom script: if udg_ReviveHeroTimerArray[udg_ReviveHeroLoop2] == udg_ReviveHeroTimer then
          • Set ReviveHeroPlayer = (Owner of ReviveHeroUnitArray[ReviveHeroLoop2])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Player number of ReviveHeroPlayer) Equal to 3
                  • (Player number of ReviveHeroPlayer) Equal to 4
                  • (Player number of ReviveHeroPlayer) Equal to 5
                  • (Player number of ReviveHeroPlayer) Equal to 14
            • Then - Actions
              • Set ReviveHeroPoint = (Center of REVIVE HU <gen>)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Player number of ReviveHeroPlayer) Equal to 6
                  • (Player number of ReviveHeroPlayer) Equal to 7
                  • (Player number of ReviveHeroPlayer) Equal to 8
                  • (Player number of ReviveHeroPlayer) Equal to 13
            • Then - Actions
              • Set ReviveHeroPoint = (Center of REVIVE ORC <gen>)
            • Else - Actions
          • Hero - Instantly revive ReviveHeroUnitArray[ReviveHeroLoop2] at ReviveHeroPoint, Show revival graphics
          • Unit - Set mana of ReviveHeroUnitArray[ReviveHeroLoop2] to (Max mana of ReviveHeroUnitArray[ReviveHeroLoop2])
          • Countdown Timer - Hide ReviveHeroTimerWindowArray[ReviveHeroLoop2]
          • Camera - Pan camera for ReviveHeroPlayer to ReviveHeroPoint over 0.00 seconds
          • Selection - Add ReviveHeroUnitArray[ReviveHeroLoop2] to selection for ReviveHeroPlayer
          • Game - Display to (All players) for 5.00 seconds the text: (Index + ((String(ReviveHeroLoop2)) + (: + ((Name of ReviveHeroUnitArray[ReviveHeroLoop2]) + Revived))))
          • Custom script: call RemoveLocation(udg_ReviveHeroPoint)
          • Custom script: set udg_ReviveHeroPoint = null
          • Custom script: set udg_ReviveHeroPlayer = null
          • Custom script: exitwhen true
          • Custom script: endif
      • Custom script: set udg_ReviveHeroTimer = null

I'm thinking of updating the triggers related to Kill Streaks, since the same problem might occur with them. What do you think about that?

Hey mate, I downloaded the map! It's still giving me errors. The heroes aren't reviving and the timer isn't showing the seconds.

why do you start a timer if you dont use it ? also you start (expiring timer) which is not a timer object , but an event response. using wait for reviving hero is bad practice.

in the etrigger edtiro press ctrl+B to call the variable windows, and create a variable of type Timer, Timer Window, Unit, Point

  • create timer windows
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Countdown Timer - Create a timer window for timer[(Integer A)] with title Respawn:
          • Set timer_w[(Integer A)] = (Last created timer window)
          • Countdown Timer - Hide (Last created timer window)
  • unit dies event
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set playerNum = (Player number of (Owner of (Triggering unit)))
      • Set timer_checked[playerNum] = False
      • Countdown Timer - Start timer[playerNum] as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Show timer_w[playerNum] for (Player(playerNum))
  • check timers loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • timer_checked[(Integer A)] Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Remaining time for timer[(Integer A)]) Equal to 0.00
                • Then - Actions
                  • Set timer_checked[playerNum] = True
                  • Countdown Timer - Hide timer_w[(Integer A)]
                  • Hero - Instantly revive Hero[(Integer A)] at ReviveLoc[(Integer A)], Show revival graphics
                  • Selection - Select Hero[playerNum] for (Player(playerNum))
                  • Camera - Pan camera for (Player(playerNum)) to ReviveLoc[playerNum] over 0.00 seconds
                • Else - Actions
            • Else - Actions

Hey thanks! If you could explain what kind of variables to create, maybe I could copy these triggers!

Or a test map if it's not too much trouble. Thanks!
I saw this triggers on the forum. One for each player. It actually works perfectly. Do you think it's good? Or is your option better?
  • REVIVE TEAL
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Equal to Player 3 (Teal)
      • ((Dying unit) is A Hero) Equal to Verdadero
      • ((Dying unit) is an illusion) Equal to Falso
    • Actions
      • Custom script: local timerdialog WINDOW
      • Custom script: local integer HEROWAIT
      • Custom script: local timer OURTIMER
      • Custom script: local unit OURHERO
      • Custom script: set OURHERO = GetDyingUnit()
      • Custom script: set HEROWAIT = ( GetHeroLevel(OURHERO) + 10 )
      • Custom script: set OURTIMER = CreateTimer()
      • Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
      • Custom script: call CreateTimerDialogBJ( OURTIMER, GetPlayerName(GetOwningPlayer(OURHERO)) )
      • Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
      • Custom script: call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
      • Custom script: call PolledWait( HEROWAIT )
      • Custom script: call ReviveHero(OURHERO, GetRectCenterX(udg_RA), GetRectCenterY(udg_RA), true )
      • Custom script: call PanCameraToTimedForPlayer( GetOwningPlayer(OURHERO), GetRectCenterX(udg_RA), GetRectCenterY(udg_RA), 0.60 )
      • Custom script: call DestroyTimerDialog(WINDOW)
      • Custom script: call DestroyTimer(OURTIMER)
      • Custom script: set OURTIMER = null
      • Custom script: set OURHERO = null
      • Custom script: set WINDOW = null
 
Hey mate, I downloaded the map! It's still giving me errors. The heroes aren't reviving and the timer isn't showing the seconds.
The test map is working properly. The errors may be related to how you implemented the triggers in your map. In that case, I would need access to your map to know how you did it.
 
Back
Top