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

Automatic hero respawn using triggers?

Status
Not open for further replies.
Level 7
Joined
Mar 9, 2016
Messages
226
I'm trying to create an automatic respawn system for a specific unit type.
Or rather specific placed 8 units. Anyone knows how?

Currently I figured out how to make the unit move instantly after its health is below 200.
Though that makes the game a bit off, still trying to figure this out.

  • Player Respawn
    • Events
      • Unit - Settler 0058 <gen>'s life becomes Less than 200.00
    • Conditions
    • Actions
      • Unit - Move (Triggering unit) instantly to (Center of Respawn <gen>)
 
Last edited:
Level 7
Joined
Mar 10, 2013
Messages
366
Use the event Unit dies, check if the unit that died is the type of the type you want if it is, revive it on it's position or anywhere you want (if it's a unit that should've respawn at an specific region, you wether need to check if the dying unit is THE unit you want and revive at the specific location, you can use arrays, hashatables, concatenated ifs, or whatever).
 
Level 7
Joined
Mar 9, 2016
Messages
226
Use the event Unit dies, check if the unit that died is the type of the type you want if it is, revive it on it's position or anywhere you want (if it's a unit that should've respawn at an specific region, you wether need to check if the dying unit is THE unit you want and revive at the specific location, you can use arrays, hashatables, concatenated ifs, or whatever).
No clue how to do that, thanks though, :D
 
Level 7
Joined
Mar 9, 2016
Messages
226
What's your setup, exactly and what you want to do, exactly (please, be detailed)?
Well, there's 8 players. The only way for them to respawn up until now was through a structure. But if the structure is destroyed the player is pretty much forced to quit the game.
So, the idea is that when the player's main character (Hero unit) dies, he'd respawn within the spawn city location which is a non combat zone, every unit that enters it, or is there is invulnerable until it leaves.

Pretty much revival in a specific region within the city instead of using a structure.
 
Level 11
Joined
Jun 2, 2004
Messages
849
There's the Hero- Revive Instantly event which can be used to revive a dead hero.

A very simple trigger would be something like this:

  • Events
    • Unit - A unit Dies
  • Conditions
    • ((Triggering unit) is A Hero) Equal to True
  • Actions
    • Wait 30.00 game-time seconds
    • Hero - Instantly revive (Triggering unit) at (Center of (Playable map area)), Show revival graphics
 
Status
Not open for further replies.
Top