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

[General] MPI Hero Respawn Trigger

Status
Not open for further replies.
Event: unit dies
condition: triggering unit is a hero
wait 5 seconds
create unit of type of triggering unit at your_location

That would be a unit respawn/revive trigger, he wants one for heroes.

This should work and is MUI:

  • revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Wait 20.00 seconds
      • Custom script: set udg_unitvar = u
      • Hero - Instantly revive unitvar at (Center of (Playable map area)), Show revival graphics
The unitvar and custom scripts may be unnecessary.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
Even with custom scripts you could reduce it to:
revive
  • joinminus.gif
    events.gif
    Events
    • line.gif
      joinbottom.gif
      unit.gif
      Unit - A unit Dies
  • joinminus.gif
    cond.gif
    Conditions
    • line.gif
      joinbottom.gif
      if.gif
      ((Triggering unit) is A Hero) Equal to True
  • joinbottomminus.gif
    actions.gif
    Actions
    • empty.gif
      join.gif
      page.gif
      Custom script: local unit udg_unitvar = GetTriggerUnit()
    • empty.gif
      join.gif
      zzz.gif
      Wait 20.00 seconds
    • empty.gif
      joinbottom.gif
      hero.gif
      Hero - Instantly revive unitvar at (Center of (Playable map area)), Show revival graphics
 
Level 5
Joined
Oct 16, 2015
Messages
132
That would be a unit respawn/revive trigger, he wants one for heroes.

This should work and is MUI:

  • revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Wait 20.00 seconds
      • Custom script: set udg_unitvar = u
      • Hero - Instantly revive unitvar at (Center of (Playable map area)), Show revival graphics
The unitvar and custom scripts may be unnecessary.

What if I have 2 different respawn locations? Do I have to create 2 triggers?
 
Status
Not open for further replies.
Top