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

[General] Item That Revives?

Status
Not open for further replies.
Level 39
Joined
Feb 27, 2007
Messages
5,016
Eh, dummy is actually more complicated than just using a unit group in this case.
I feel like I just keep showing up in threads to say I disagree with you... but I disagree here too unless I've misunderstood what you mean. Using a unit group requires you to filter out all the types of units you might not want to revive (undead, enemy, or buildings for example), actively pick N of them via some logic, then clean location leaks when you create new copies of those units, and finally destroy the group. Dummy resurrection can set all the appropriate target fields and number to revive without having to worry about logic or more than 1 location leak to clean.


If I was making this item for me I probably wouldn't use resurrection either, but that's just because the method isn't dynamic. It's certainly simpler and more intuitive for users with minimal trigger experience.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Using a unit group requires you to filter out all the types of units you might not want to revive (undead, enemy, or buildings for example)
How would you make sure to not revive undead units, if you don't want to filter them out?

I don't know if the units revived will be owned by the item user or keep their previous owner.
If they are supposed to be owned by the item user, you will have to use a unit group though, because Resurrection gives the units to the previous owner.
 
Level 39
Joined
Feb 27, 2007
Messages
5,016
@Chaosy is (probably) correct.
How would you make sure to not revive undead units, if you don't want to filter them out?
I don't really have an answer to this because I assumed undead was a targeting option, which it is not, despite the fact that it is a checkable unit classification. That really makes no sense to me. At any rate there are two solutions I see depending on for whom undead units appears in OP's map; one is simple and one is not.
  • If enemies are all undead and players are all non-undead then simply remove enemies from the targets list. Unlikely but if the map is zombie defense or something it could be applicable.
  • Co-opt the Ancient classification to instead mean undead in the map instead and manipulate spell targeting via that classification. Suicidal works for this too but I believe having units classified that way does change some of the unit auto-targeting AI.
Resurrection gives the units to the previous owner.
If I played melee with any regularity I would have known this; always wondered why Animate Dead was timed and Resurrection was permanent. As that is the case I am clearly wrong about using Resurrection here unless the OP wants them revived for their previous owner.
 
Last edited:

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
I don't really have an answer to this because I assumed undead was a targeting option, which it is not. Death Coil/Holy Light clearly show there is such a check the game can make but it's not accessible to us
Death Coil and Holy Light are special in that regard. They additionally use the race demon as a valid target for undead units.
Other abilities like death pact, dark ritual or unsummon only work on units with the undead classification.
Co-opt the Ancient classification to instead mean undead in the map instead and manipulate spell targeting via that classification. Suicidal works for this too but I believe having units classified that way does change some of the unit auto-targeting AI.
This works as well, though it is probably more work to add ancient to all undead or non-undead units than using a unit group. Considering that there are not many classifications we can use in "targets allowed", I always like to save them until I really need them. There is ancient, suicidal and mechanical, though mechanical is often used in its original purpose and has the side effect of hurt units burning.
 
Level 5
Joined
Apr 13, 2018
Messages
124
Pyrogasm,Light
  • If enemies are all undead and players are all non-undead then simply remove enemies from the targets list. Unlikely but if the map is zombie defense or something it could be applicable.
  • Co-opt the Ancient classification to instead mean undead in the map instead and manipulate spell targeting via that classification. Suicidal works for this too but I believe having units classified that way does change some of the unit auto-targeting AI.


Yes it works perfectly! :grin:!
Appreciated!
+ rep :eekani:
 
Status
Not open for further replies.
Top