- Joined
- Apr 13, 2018
- Messages
- 124
Hi I want to make a item that when pick, it revives the nearby dead units except undead. How to fo this?
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.Eh, dummy is actually more complicated than just using a unit group in this case.
How would you make sure to not revive undead units, if you don't want to filter them out?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)
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.How would you make sure to not revive undead units, if you don't want to filter them out?
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.Resurrection gives the units to the previous owner.
Death Coil and Holy Light are special in that regard. They additionally use the race demon as a valid target for undead units.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
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.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.