• 🏆 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!

Why not work?

Status
Not open for further replies.
Level 5
Joined
Apr 27, 2014
Messages
115
In the tutorial of my project I can not resurrect the heroes automatically, I took the trigger from a DOTA map but I think I deleted something by mistake... at first it worked, now no longer works

  • Revive Heroes
    • Eventi
      • Unit - A unit dies
    • Condizioni
      • ((Dying unit) is a Hero) Uguale a TRUE
      • (Owner of (Dying unit)) Uguale a Giocatore (Rosso)
    • Azioni
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Se - Condizioni
          • ((Dying unit) is in SuperHeroes) Uguale a TRUE
        • Allora - Azioni
          • Gruppo di unitÃ* - Add (Dying unit) to RevivableHeroes
          • Conto alla rovescia - Start ReviveTimers[1] as a Una volta timer that will expire in 3.00 seconds
        • Altrimenti - Azioni
  • Revive SuperHeroes Timer
    • Eventi
      • Tempo - ReviveTimers[1] expires
    • Condizioni
    • Azioni
      • Gruppo di unitÃ* - Pick every unit in RevivableHeroes and do (Actions)
        • Giro - Azioni
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Se - Condizioni
              • (Nick Fury 0158 <gen> is alive) Uguale a TRUE
            • Allora - Azioni
              • Set HeroCentre[1] = (Center of Startzone1 <gen>)
              • Eroe - Instantly revive (Picked unit) at HeroCentre[1], Mostra revival graphics
              • UnitÃ* - Move Nick Fury 0158 <gen> instantly to HeroCentre[1]
              • Wait 3.00 seconds
              • Custom script: call RemoveLocation(udg_HeroCentre[1])
            • Altrimenti - Azioni
Can you tell me why?
 
Wow reading Italian (I'm guessing) is annoying when you can't speak it ^^

The only thing I can see that should mess it up is the Wait 3.00 seconds. Try disabling it and see if it works.

Exactly. Wait within unit group enumerations doesn't work as expected. Additionally, removing the location after a waiting period makes no sense. Directly remove it. You can use another timer instead of the wait, but I don't see why you would need that anyway - this is exactly why you fire the timer in the first place; if you want a duration of 6 seconds instead, then allow the timer to expire after 6 seconds and not 3.

Finally, use "Triggering unit" over Dying unit. It's faster and much more flexible.
 
Level 5
Joined
Apr 27, 2014
Messages
115
Exactly. Wait within unit group enumerations doesn't work as expected. Additionally, removing the location after a waiting period makes no sense. Directly remove it. You can use another timer instead of the wait, but I don't see why you would need that anyway - this is exactly why you fire the timer in the first place; if you want a duration of 6 seconds instead, then allow the timer to expire after 6 seconds and not 3.

Finally, use "Triggering unit" over Dying unit. It's faster and much more flexible.

Pharaoh_? Are you still alive? :grin: (just a joke)

Thank you for answering me, the Wait action is a "remnant" of an old Cinematic (Nick Fury said "You're failde, try again" but it didn't work)

In the old Revive Superheroe Timer there was a condition
  • Condition
    • ReviveTimers[1] is less than 1.00
but I remove because if the Event is:
  • Eventi
    • Time ReviveTimers[1] expires
then ReviveTimers[1] is less than 1.00 ... or not?

Tomorroow I tried to remove the wait action and change Dying Unit into Triggering Unit...

Thank you and thank to Solu9 :thumbs_up:
 
Status
Not open for further replies.
Top