HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spawn units with Create Corpse ability?

11-19-2008, 01:42 PM#1
Monstah
(Got an error, sorry if this gets double posted)

Good afternoon.

In this http://www.wc3campaigns.net/showthread.php?t=59467 topic, the guy says he used a modified version of Create Corpses ability to make a building spawn units. How can this be done?

Obviously you need triggers, cause even though you can change the creature type on the ability, it will always be a corpse. I can't catch Create Corpse "ability being cast" by anything in this world, so my solution so far was spawning an exotic corpse (So the trigger wouldn't be activated by accident by another unit), and catching when such a creature entered the map.

Bringing it to life is the problem. Setting life to 100% doesn't do the trick. I tried replacing it for a live unit, but it becomes Neutral. And since I can't catch the "ability being cast" (and corpses appearently have no owner), I can't have the trigger figure out who the creature belongs to.

Suggestions? Thanks for the time. I had been lurking of here some years ago, and you gave me some pretty cool ideas. Been a long time since I don't Warcraft, tho.
11-20-2008, 09:18 AM#2
botanic
replace it with a live unit and change the owner of the last created unit? Get the owner by owner of unit unit type creature maker within 10.
11-20-2008, 01:31 PM#3
Monstah
Quote:
Originally Posted by botanic
Get the owner by owner of unit unit type creature maker within 10.

That's a nice idea, thank you! Don't think the first one will work for the same reason I couldn't do it before: the corpse created doesn't seem to have an owner (maybe it does, but it seems it doesn't). Checking for the closest spawning unit might do it, tho.

Had another idea, too, but haven't put in practice yet: create corpse + corpse cargo hold in a hidden spellbook, carrion beetles as the spawning ability. It even limits the maximum spawning units, so it's perfect for my needs (if it works). Thoughts?
11-21-2008, 08:20 PM#4
DioD
It will trigger Unit Summoned event, just check for summon type and replace with alive unit.
11-21-2008, 09:15 PM#5
Monstah
It is summoned? Hm, interesting. At first I thought it wasn't even a unit, but a doodad or something, but after some testing I found it is a unit of Team 16 (I think it was 16, but am not sure. Neutral Passive?).

One thing, tho: Create corpse limits maximum ammount of corpses. It worked just the way I wanted it to, EXCEPT that the unit is... well, dead. If I replace it for a live one, it will never reach the maximum ammount of corpses, and corpses will keep on appearing (and being replaced).

So now I'm trying to base it off Carrion Scarabs. Summons permanent units, and limits the maximum number of them. Works like a charm. Except now I need corpses.

Create Corpse hidden in a spellbook + Carrion Scarabs seems to do the work, but now there's always a dead Ghoul in front of my Town Hall. Tried hiding it with Cargo Hold (Meat Wagon), but then I also need Get Corpse, and it will only pick the bodies if I set it as a default active ability, which disables autocast for Carrion Scarabs. Me sad :(