so the idea is to get this to work like it did in wc3.
what we have:
unit setup to use ability. ability setup to target dead units. effect setup to heal caster when ability is triggered.
kill a creature unit, my health is down by 10 points(you get a different error when you have full health already saying you cant use it), target the thing you just killed.
error: can only target dead units
thoughts...???
personally it seems like there is no dead unit created when a creature dies. but if anyone can help me out that would be great..
Sounds to me like you'd pretty much have to make a new unit (corpse), then edit all the old units to spawn one when they die (or do it with triggers) assigned to player 0, neutral. The corpse unit would of course have to have no abilities, and in fact, not be able to move. Then you'd just have to have the cannibalize ability only target corpse units.
Quote from PersistentMemory:
Sounds to me like you'd pretty much have to make a new unit (corpse), then edit all the old units to spawn one when they die (or do it with triggers) assigned to player 0, neutral. The corpse unit would of course have to have no abilities, and in fact, not be able to move. Then you'd just have to have the cannibalize ability only target corpse units.
Or create a buff called corpes and change the model if the unit has buff. Untargettable unselectable and uncommandable.
Validator for units with the buff.
Quote from Yuvak:
I think your problem is that dead units have an unclickable flag, so you can't click them.. I have no idea how to change it on the other hand..
There is a option 'unselectable'.
Of course there is a bug with it. If you select the unit before hand and don't deselect it, you will still be 'selecting' it. I guess when the unit takes fatal damage, you can make a trigger to delect the unit. Still I hate we have to have a workaround.
ok so i am trying to make this really simple for the sake of testing this. anybody have a way to create a dead unit that doesnt disappear? im thinking a prop or doodad or something but i cant find anything that i can assign the dead attribute to....
Ooh, this sounds like a fun objective. Let me play around.
Here's something for you work off of. 250mm cannon is cannibalize. Try it after killing a nearby zergling.
I bet you can destroy the corpse after it's been eaten too. Let me know if you have questions on what I did there, but ideally you can sit down and see how I did it.
@corpse: Probably can create a freeze on the death animation so you have a "corpse".
My example doesn't require you to target a corpse, just have a corpse nearby (2m range).
wow thats actually quite brilliant. the only thing i cant see is how it makes the ability that invokes the search effect and how it get to acutally invoking the persistant cannibalize effect.
sorry i found it
thank you so much for that. its strange to the think of search as an effect. on this note it sounds like it would make having a resurection sort of ability very difficult to pull off with bodies disappearing and not targetable. seeing how you may not want to rez the closest thing to you....
You can use an Effect - Target solution instead. I only did the Effect - Instant to emulate the cannibalize system of Warcraft 3 (Where you press the button and the ghoul runs to a nearby corpse and starts eating). I was originally going to make it so the unit walks over and starts "eating" corpse, but couldn't see an easy way to force the unit casting to face the point it searched for. (I'd probably use a issue order command in triggers if I were to start this, when it aquires a target)
There's a field in the unit type data editor section called Stats - Death duration or something that shows how long a corpse stays after the unit dies.
Add in a death event to the unit's actor to stop the animation sequence prematurely when it's still fleshy to cause an illusion of a live meaty corpse on ground.
@ Ressurection you can likely use an Effect target combined with a validator to ensure the target it's casted on is dead, then cause a revive effect. Maybe write a trigger to handle the revive action.
I played around with this.. Seems they took out the old "revive" action trigger in WC3, so it made the issue of reviving a unit a bit annoying. (There is a revive ability, but it does a food check along with being a generic placeholder icon, not a "real" resurrect). So I resorted to writing a trigger to recreate the unit.
This isn't perfect, but it should be enough for most scenarios (I would think applying an incap behavior with an end effect of destroying the unit can be used to emulate death so you can revive a unit safer, but I didn't feel like recreating that).
so the idea is to get this to work like it did in wc3.
what we have: unit setup to use ability. ability setup to target dead units. effect setup to heal caster when ability is triggered.
kill a creature unit, my health is down by 10 points(you get a different error when you have full health already saying you cant use it), target the thing you just killed.
error: can only target dead units
thoughts...???
personally it seems like there is no dead unit created when a creature dies. but if anyone can help me out that would be great..
Sounds to me like you'd pretty much have to make a new unit (corpse), then edit all the old units to spawn one when they die (or do it with triggers) assigned to player 0, neutral. The corpse unit would of course have to have no abilities, and in fact, not be able to move. Then you'd just have to have the cannibalize ability only target corpse units.
ok so i am trying to make this really simple for the sake of testing this. anybody have a way to create a dead unit that doesnt disappear? im thinking a prop or doodad or something but i cant find anything that i can assign the dead attribute to....
Ooh, this sounds like a fun objective. Let me play around.
Here's something for you work off of. 250mm cannon is cannibalize. Try it after killing a nearby zergling.
I bet you can destroy the corpse after it's been eaten too. Let me know if you have questions on what I did there, but ideally you can sit down and see how I did it.
@corpse: Probably can create a freeze on the death animation so you have a "corpse".
My example doesn't require you to target a corpse, just have a corpse nearby (2m range).
wow thats actually quite brilliant. the only thing i cant see is how it makes the ability that invokes the search effect and how it get to acutally invoking the persistant cannibalize effect.
sorry i found it thank you so much for that. its strange to the think of search as an effect. on this note it sounds like it would make having a resurection sort of ability very difficult to pull off with bodies disappearing and not targetable. seeing how you may not want to rez the closest thing to you....
but thanks a ton for the unique solution!!!!
You can use an Effect - Target solution instead. I only did the Effect - Instant to emulate the cannibalize system of Warcraft 3 (Where you press the button and the ghoul runs to a nearby corpse and starts eating). I was originally going to make it so the unit walks over and starts "eating" corpse, but couldn't see an easy way to force the unit casting to face the point it searched for. (I'd probably use a issue order command in triggers if I were to start this, when it aquires a target)
There's a field in the unit type data editor section called Stats - Death duration or something that shows how long a corpse stays after the unit dies.
Add in a death event to the unit's actor to stop the animation sequence prematurely when it's still fleshy to cause an illusion of a live meaty corpse on ground.
@ Ressurection you can likely use an Effect target combined with a validator to ensure the target it's casted on is dead, then cause a revive effect. Maybe write a trigger to handle the revive action.
I played around with this.. Seems they took out the old "revive" action trigger in WC3, so it made the issue of reviving a unit a bit annoying. (There is a revive ability, but it does a food check along with being a generic placeholder icon, not a "real" resurrect). So I resorted to writing a trigger to recreate the unit.
This isn't perfect, but it should be enough for most scenarios (I would think applying an incap behavior with an end effect of destroying the unit can be used to emulate death so you can revive a unit safer, but I didn't feel like recreating that).
Vid of it in action.
wow this has been amazing. definetely appreciate your help. you have done a fantastic job of figuring this out!!!