• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

How to resurrect a corpse

Status
Not open for further replies.
Level 4
Joined
Oct 28, 2012
Messages
82
Hello.
I was trying to remake the resurrection spell to resurrect enemy unit too, and I realize I have no idea how to pick a corpse to resurrect it.
Please help.
Thank in advance.
 
Code:
Event: 
unit has died (generic)

Conditions: 

Actions: 
set dyingUnitType = unit-type of triggering unit
set realVariable1 = convert triggering unit's real value (hit points) (uHoc or smt I believe)
set realVariable2 = convert triggering unit's real value (mana)
etc..
*(remove triggering unit from game) optional, or disable can decay in object editor
create 1 dyingUnitType for triggering player at X and Y position of triggering unit
set lastcreatedunit's hit points to realVariable1
set lastcreatedunit's mana to realVariable2
etc..

If you can't figure it out, let me know and I'll show you in the World Editor!
 
Thank you.
The similar thread is exactly what I want.


@lil apex
thank
I think I could go with this for less chance for problem to happen.
 
Last edited:
Thank you.
The similar thread is exactly what I want.


@lil apex
thank
I think I could go with this for less chance for problem to happen.

Yeah it's the most manual way I can think of (and therefore the least buggy).

If you keep everything in one trigger try to use "triggering unit" etc. (in-built variables) as much as you can, they're faster (and less buggy) than storing them to variables. Store it to variables if you want to call on the data in another script or at a later time.

Good luck with your mapmaking!
 
Status
Not open for further replies.
Back
Top