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

Is it possible to revive dead units with triggers?

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
Basically the title. I want to know if I can reanimate units without using the built-in abilities (resurrection and animate dead). Or would I need to fake it and spawn new units of the same unit type as the dead ones?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
What jwx555 said is that it is impossible to do so.
However, there is not a direct way to do it but you can recreate the unit.

Set TempUnit = (your dead unit)
Set TempLocation = (Position of TempUnit)
Unit - Create 1 (unit-type of dead unit) at TempLocation facing (Facing angle of TempUnit) degrees.
Unit - Remove TempUnit from the game.
Custom Script: call RemoveLocation(udg_TempLocation)
 
Level 25
Joined
May 11, 2007
Messages
4,651
Give the dead unit the reincarnation ability if you're trying to make it so they respawn after a certain time being dead.

Just give it a cooldown if you want them to stay dead after using it.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Nah, they need to die for real and be revived by a spell. You get money by killing them and reincarnate doesn't trigger "unit dies". They may also revive under another player's control.

Jass is fine. Seems like I need to fake it, but that is fine with me.
 
Status
Not open for further replies.
Top