• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] whats wrong with my revive system here is the trigger

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
  • Revive Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Add Player 1 (Red) to PlayersSaints
      • Player Group - Add Player 2 (Blue) to PlayersSaints
      • Player Group - Add Player 3 (Teal) to PlayersSaints
      • Player Group - Add Player 4 (Purple) to PlayersSaints
      • Player Group - Add Player 5 (Yellow) to PlayersSaints
      • Player Group - Add Player 6 (Orange) to PlayerSource
      • Player Group - Add Player 7 (Green) to PlayerSource
      • Player Group - Add Player 8 (Pink) to PlayerSource
      • Player Group - Add Player 9 (Gray) to PlayerSource
      • Player Group - Add Player 10 (Light Blue) to PlayerSource
  • Revive Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Add (Dying unit) to RevivableHeroes
      • Set TempReal = (((Real((Hero level of (Dying unit)))) x 2.00) + 1.00)
      • Countdown Timer - Start ReviveTimers[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in TempReal seconds
      • Countdown Timer - Create a timer window for ReviveTimers[(Player number of (Owner of (Dying unit)))] with title (Name of (Owner of (Dying unit)))
      • Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
      • Set RevivableTimersWindows[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
  • Revive Hero Timer
    • Events
      • Time - ReviveTimers[1] expires
      • Time - ReviveTimers[2] expires
      • Time - ReviveTimers[3] expires
      • Time - ReviveTimers[4] expires
      • Time - ReviveTimers[5] expires
      • Time - ReviveTimers[6] expires
      • Time - ReviveTimers[7] expires
      • Time - ReviveTimers[8] expires
      • Time - ReviveTimers[9] expires
      • Time - ReviveTimers[10] expires
      • Time - ReviveTimers[11] expires
      • Time - ReviveTimers[12] expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in RevivableHeroes and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for ReviveTimers[(Player number of (Owner of (Picked unit)))]) Less than 1.00
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is in PlayersSaints) Equal to True
                • Then - Actions
                  • Countdown Timer - Destroy RevivableTimersWindows[(Player number of (Owner of (Picked unit)))]
                  • Hero - Instantly revive (Picked unit) at (Center of Region 026 <gen>), Show revival graphics
                  • Unit Group - Remove (Picked unit) from RevivableHeroes
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is in PlayerSource) Equal to True
                • Then - Actions
                  • Countdown Timer - Destroy RevivableTimersWindows[(Player number of (Owner of (Picked unit)))]
                  • Hero - Instantly revive (Picked unit) at (Center of Region 025 <gen>), Show revival graphics
                  • Unit Group - Remove (Picked unit) from RevivableHeroes
                • Else - Actions
            • Else - Actions

it works for The Saints side but not for the Source :S whats wrong :S i have no idea on the evil side it dont even spawn :S

and also can some one show me how to make a trigger that only 1 player can have the SUmo hero so when u choose when a player choose sumo only 1 player can have him for all heroes how i do this?
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
Try removing
"(Remaining time for ReviveTimers[(Player number of (Owner of (Picked unit)))]) Less than 1.00"
It isn't needed since the timer is ending anyway.
P.s. this will not work 100%, because TempReal will work for each dying hero,
if two heroes die at the same time, they'll have the same amount of time to be ressurected.
 
Level 24
Joined
Jun 16, 2008
Messages
1,939
Level 12
Joined
Aug 22, 2008
Messages
911
Don't destroy the window, hide it. Much more simple it is.
The condition (Remaining time for ReviveTimers[(Player number of (Owner of (Picked unit)))]) Less than 1.00 is completely useless and your trigger could do without it.
No idea why it doesn't spawn though, just made some simple suggestions. :)
 
Status
Not open for further replies.
Top