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

Create unit using dying unit stats

Status
Not open for further replies.
Level 2
Joined
May 18, 2014
Messages
20
I am making a map, and i wanted to do a trigger where, if a certain unique building is dead, and them a hero that started near the building die as well, and the owner of the unit that is killing it is player 1(red) them remove that hero from the game and create another hero(undead version) of the hero who is dying but with the same level,items and stats as the one who died, can anyone help me with that?
 
Level 17
Joined
Mar 21, 2011
Messages
1,597
Level 2
Joined
May 18, 2014
Messages
20
well i dont get everything you have written there. What you could do is:
Dont remove the hero from the game. instead of this, you could passively transformate your hero. for this, you need to copy your hero and just change the model (to an undead version in your case). now, use this trick:
http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/hero-passive-transformation-198482/

this will transform your hero, your attributes/level/items are still the same, just the model changes

that worked!!!! thx a lot, can i make it so, if the hero is dead, the building get's destroyed, them the hero is changed owner but is still dead, i wanna make it so it revives in red's base, how can i do it?

Edit:Nvm i found out how, thx anyway.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
You just need to remove the items, and store the experience before removing him. You can create a temporary version of him, give him the experience and measure the stats to pickup on tomes and store those as a stat modifier. Then create the undead version, give him all items, give him the experience and then add on the tome stats. Hero abilities can be ignored as the player can learn them (nothing lost). If bonus skill points are given via triggers you will need to add those again as well (keep track on them in an integer variable).
 
Status
Not open for further replies.
Top