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

[Trigger] Hero Revive (Instantly)

Status
Not open for further replies.
Level 2
Joined
Oct 1, 2009
Messages
12
Hello ;)
In my map i have a trigger to respawn enemy hero but it not working always. It revive him 3 times and then not. Is there any error in my trigger?

  • respawn
    • Events
      • Unit - A unit dies
    • Conditions
      • (Owner of (Triggering unit)) == Player 1 (Red)
      • ((Triggering unit) is Hero) == YES
    • Actions
      • Wait 10.00 seconds
      • Hero - Instantly revive (Triggering unit) at (Center of wskrzes2 <gen>), Hide revival graphics
      • Hero - Add 250 experience to (Triggering unit), Hide level-up graphics
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
maybe instead of triggering unit,use dying unit?(it should work with triggering unit,too,but i don't know :/ )
Also make sure the conditions are true always in your map.
And about the wait command....maybe you can change this?Make something else that revives hero for each of his level x3?Example if hero is 5 level he will be respawned in 15 seconds.(3x5=15)
 
Level 2
Joined
Oct 1, 2009
Messages
12
Thanks, I have changed to daying unit but it's not enought.
After setting food,gold and luber cost to zero it works.
 
Level 11
Joined
Feb 14, 2009
Messages
884
Also, your trigger leaks a location. And it would be better if you didn't use waits, unless Player 1 can control 1 hero max.
 
Level 11
Joined
Feb 14, 2009
Messages
884
By using timers. Create one and add another trigger that runs when the timer expires.
 
Level 11
Joined
Feb 14, 2009
Messages
884
Wait is more efficient than nothing. Actually, Wait is one of the worst things in GUI. It bugs your triggers most of the times, and it completely destroys things such as multinstanceability (I hope I spelt this correctly lol).
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
There isn't really any error with that trigger, except the leak. Check if you have some other trigger that causes the unit not to respawn.

maybe instead of triggering unit,use dying unit?(it should work with triggering unit,too,but i don't know :/ )

Dying unit and triggering unit return the same unit for that event, they both work.

And it would be better if you didn't use waits, unless Player 1 can control 1 hero max.

It's fine to use wait in this case. And as long as one uses <triggering unit> it doesn't matter how many heroes player 1 has, the trigger is MUI. Using wait does not destroy multi-instanceability, if you use it correctly.
 
Status
Not open for further replies.
Top