• 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.

Revive Unit

Status
Not open for further replies.
Level 16
Joined
Mar 3, 2006
Messages
1,564
No revive for normal unit, only heroes. But you can do this:

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Unit - Kill Unit
  • Untitled Trigger 002
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 (Unit-type of Unit) for Player 1 (Red) at TempPoint facing Default building facing degrees
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
You have to modify those trigger's events and conditions as you see fit and don't forget to remove leaks.
 
Doesn't "Create unit at Loc" work? (of course, fix the location leak)
You can then set the correct variable to the created unit...

of cause I can set the variables but in this case I would have to check every variable in my map to see if it saved the unit and some other stuff which requires something like revive

No revive for normal unit, only heroes. But you can do this:

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Unit - Kill Unit
  • Untitled Trigger 002
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 (Unit-type of Unit) for Player 1 (Red) at TempPoint facing Default building facing degrees
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
You have to modify those trigger's events and conditions as you see fit and don't forget to remove leaks.

same here

but if it does not work I'll think about something else :/

unfortunately reviving heros does leak so I can't use that

thanks anyway
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
Revive Hero is a native.

if you can find a version of KaTTana's handle vars that's not screwed up with 1.24 you can set flags using strings and booleans. If not, I dunno what you can do. Looping through all variables is very inefficient.
 
Level 11
Joined
May 11, 2008
Messages
830
Shouldn't this do?

  • Replace Unit
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Unit - Replace (Dying unit) with a Footman using The old unit's relative life and mana
Of course your gonna need to edit some thing like Conditions and Footman with whatever and the old units life and mana with what you want but you get the idea.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
Shouldn't this do?

  • Replace Unit
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Unit - Replace (Dying unit) with a Footman using The old unit's relative life and mana
Of course your gonna need to edit some thing like Conditions and Footman with whatever and the old units life and mana with what you want but you get the idea.

No, it wont unless you replace (Dying unit) with (Triggering unit) plus when the unit dies its life will be ZERO so the new unit will have no life meaning it will die once it is replaced.

The event Unit dies will fire when the unit has finished its dying animation.
 
Level 11
Joined
May 11, 2008
Messages
830
No, it wont unless you replace (Dying unit) with (Triggering unit) plus when the unit dies its life will be ZERO so the new unit will have no life meaning it will die once it is replaced.

The event Unit dies will fire when the unit has finished its dying animation.

You don't get it do you? In the Replace Unit, you can change the old unit's relative life and mana with the option of New unit's Maximum Health.
 
in GUI there is a gray text written under the action which says that it does not apply all variables of the dying unit to the replaced unit

however triggering unit is the same as dying unit in this case
and somewhere was written that triggering unit would be better in some cases

e.g. if I am going to insert "wait 2 sec" the triggering unit will still be the same
if a unit died during these 2 seconds the dying unit would have changed
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
A) It wouldn't. All these natives refer to the unit that caused the event, they don't get messed up.

B)Maybe that tauren Spirit Walker thing (Ancestral Spirit) can work if it takes a target and doen't choose a random one. Add the "tauren" classification to the dying unit, then have a dummy cast that.
 
Level 12
Joined
Aug 22, 2008
Messages
911
You can make a hero be nearly like a normal unit by taking several steps:
1. Turning off its picture on the upper left corner (I know it can be done in the Object Manager, I don't remember how)
2. Disable leveling
3. Change armor-type from Hero
That way the only way the "heroism" will effect the unit is by the targeting of the unit.
 
Status
Not open for further replies.
Top