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

Picking Units raised by Animate Dead Spell?

Level 9
Joined
Apr 15, 2022
Messages
61
Hi. I've wanted to create a spell based on Animate Dead - it would raise a set amount of corpses in an area of effect range, with the twist that they would instead be raised into a specific unit type. You cast Animate Dead and raise zombies (or whatever) from surrounding corpses.

The obvious idea is to use Animate Dead as a base -> use triggers to check when it's being cast -> pick units with "Animated Corpse" buff -> replace picked units with zombies

But for some reason I can't pick the raised units? I've used various conditions and none seem to work (picked unit = unit with a specific buff; picked unit = target of ability being cast; picked unit = summoned unit; etc.). I'm not that highly experienced wth trigger based spells, so the solution shouldn't be that hard to figure out. It's likely me setting it up the wrong way

Before anyone mentions it, the spell differs a lot from raise dead. It's supposed to have a longer cooldown and again, work more akin to mass ressurection than an autocast summon

Any ideas?
 
Last edited:
Level 20
Joined
Aug 29, 2012
Messages
832
I think you'd better trigger it entirely, because conveniently enough, you can detect units that are dead like this for instance

  • (Number of units in (Units in (Playable map area) matching (((Matching unit) is dead) Equal to True))) Greater than or equal to 1
So with that in mind you can detect X amount of corpses near the caster, summon Y zombies and remove the corpses
 
Level 9
Joined
Apr 15, 2022
Messages
61
That's a really interesting take. The problem is regular spells could still be cast when there are no corpses around and the ones that detect corpses would waste at least one in the process of the spell being cast.

EDIT: I've figured it out. Based on the trigger example you've posted I've tried replacing (Picked units) with (Matching units). Everything works now.

Thanks.
 
Last edited:
Top