• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Solved] GUI Hero Revive

Level 9
Joined
Mar 26, 2020
Messages
202
How do you command the building to revive a hero unit? I've seen campaigns with npc that revives heroes like a functional melee AI map. what i've tried was this, but i want is to actually revive on the building...because i tried with the "Issue Order Targeting A Unit" but it didn't work as i wanted so this is what i did instead (temporary)

  • NPC revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Custom Paladin
    • Actions
      • Wait (50.00 + ((Real((Hero level of (Triggering unit)))) x 2.00)) game-time seconds
      • Set TempPoint = (Position of Custom Altar 0001 <gen>)
      • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Doesn't this revive at the building?

1773312688257.png
 
Doesn't this revive at the building?

View attachment 578060
that's what i did, but for some reason it doesnt work

-ive set resources for the designated AI
-tested with temporary 0 cost hero

still doesn't do the thing
(Possibly because my 'altar' is also a goldmine as well as townhall) but i've already tick the allow revive heroes...i don't get why it's not doing the thing
 
Okay after a few tests I think I know why, so when a hero dies it plays the animation, then dissipates and you have the message "our hero has fallen", and THEN it becomes revivable at the altar
Problem is, "a unit dies" fires immediately, so the altar tries to revive the hero that is not officially dead and available for revive, so you need to introduce a wait based on their death time + a few more seconds to be safe

1773319768001.png


The time changes depending on units but it's rarely above 4-5 seconds
 
Back
Top