Hero Revival

Firezy

New Member
Reaction score
14
I guess it's MUI

Problem of overlapping, if a hero dies after the original hero dies he gets spawned on the first timer, and the first hero that died gets stuck in limbo

Trigger:
  • Hero Revival
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set unit_respawn = (Triggering unit)
      • Countdown Timer - Start timer_respawn[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 10.00 seconds
      • Countdown Timer - Create a timer window for timer_respawn[(Player number of (Owner of (Triggering unit)))] with title ((string_playercolors[(Player number of (Owner of (Triggering unit)))] + (Name of (Triggering player))) + ||cFFFFCC00 will respawn in :|r)
      • Set timerwindow_respawn = (Last created timer window)
      • Trigger - Add to Hero Revival1 <gen> the event (Time - timer_respawn[(Player number of (Owner of (Triggering unit)))] expires)

Trigger:
  • Hero Revival1
    • Events
    • Conditions
    • Actions
      • Set point_revive = (Center of FirstTownTP <gen>)
      • Countdown Timer - Destroy timerwindow_respawn
      • Hero - Instantly revive unit_respawn at point_revive, Show revival graphics
      • Player - Set (Owner of unit_respawn) Current gold to (Integer((0.80 x (Real(((Owner of unit_respawn) Current gold))))))
      • Custom script: call RemoveLocation (udg_point_revive)
 

Tom Jones

N/A
Reaction score
437
Combine you triggers into one, don't assign trigger unit to a variable, just stick with using trigger unit, add a 10 second wait after the assigning of the timerwindow, change the timer window to an array variable.

Think that's it.
 

Firezy

New Member
Reaction score
14
Problem now is that if a hero dies while a timer is going, the timer is gone but the hero does not respawn

Trigger:
  • Hero Revival
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set point_revive = (Center of FirstTownTP <gen>)
      • Countdown Timer - Start timer_respawn[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 10.00 seconds
      • Countdown Timer - Create a timer window for timer_respawn[(Player number of (Owner of (Triggering unit)))] with title ((string_playercolors[(Player number of (Owner of (Triggering unit)))] + (Name of (Triggering player))) + ||cFFFFCC00 will respawn in :|r)
      • Set timerwindow_respawn[(Player number of (Owner of (Triggering unit)))] = (Last created timer window)
      • Wait 10.00 seconds
      • Countdown Timer - Destroy timerwindow_respawn[(Player number of (Owner of (Triggering unit)))]
      • Hero - Instantly revive (Triggering unit) at point_revive, Show revival graphics
      • Player - Set (Owner of (Triggering unit)) Current gold to (Integer((0.80 x (Real(((Owner of (Triggering unit)) Current gold))))))
      • Custom script: call RemoveLocation (udg_point_revive)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top