| 07-06-2003, 06:41 AM | #1 |
Simple enough question: Is it possible to have a hero leave a corpse, instead of fading away after dying? I'd like to be able to raise skeletons and such from dead heroes' corpses. |
| 07-06-2003, 06:50 AM | #2 |
Yes. Change the "Death Type" field to Can Raise, Does Decay. Unless the hero unit is removed automatically when it dies, but I don't believe that's the case. |
| 07-06-2003, 08:18 AM | #3 |
But the hero has no decay animation... I think it would still be there but it wouldn't look like that. |
| 07-06-2003, 08:31 AM | #4 |
Indeed, you're right, hero models generally have "disappear" animations when they die. If you're using hero models for your heros, this will be an issue. You could solve it by replacing the hero with a different dead unit when it dies (one which leaves a corpse). |
| 07-06-2003, 08:39 AM | #5 |
How about pausing the corps just like everyone else...? Or better yet, why not replace the hero with a corps like, 3 secs after he died? |
| 07-06-2003, 09:04 AM | #6 |
I've tried every death type, and nothing seems to work. They do the hero fade-away animation. I'm using non-hero models, since you asked. Forest Trolls and Zerglings and such. Oh, and does it make any difference that I'm using TFT? |
| 07-06-2003, 10:41 AM | #7 | |
Quote:
Nah, I think the unit death type only exists in the FT Unit Editor (not sure though) |
| 07-07-2003, 01:19 AM | #8 |
*Bump* Anyone know if this is fixable? And btw, I typoed in the title. That should be corpses. :bgrun: |
| 07-07-2003, 02:11 AM | #9 |
Uhhh Why not try this? Event - Unit dies Condition - (Dying Unit is a hero) equal to (True) Action - Create one corpse (find something that looks like the hero if you want, or just put anything) at position of Dying Unit. That corpse will work for raising skeletons just like any other corpse! If you plan on throwing in resurrection or animate dead, then you might have a problem but you could work around it by checking to see if that specific corpse is ever affected by one of the spell, then you can get rid of it, revive the hero, put it in the corpses place, and give it to the proper owner and add a countdown timer and some color efect (if its animate dead). Ehh I've probably given you more information than you need. If the corpse type doesn't matter, just make it place a corpse there when the hero dies. |
| 07-07-2003, 02:22 AM | #10 |
Guest | Just put a skeleton unit in the heros place and immediately kill it; hence leaving behind its corpse instead. Then if anyone does use animate dead or resurrection, it'll be like bringing the hero back as a weak little skeleton (sort of) .. unless you need to be able to res the hero with resurrection, then you'd need some variable array to keep track of the corpses and test them for the spells and what-not. |
| 07-07-2003, 06:29 AM | #11 |
That's the problem; I do need animate dead and all that. I guess I'll just have to revert them to normal units. |
| 07-07-2003, 08:44 AM | #12 | |
Quote:
No wait I just got an idéa The heroes have the same model as ordinary units, right? Why not make it so that right when they die, they are replaced by a unit with the same model with the same hp (in this case, 0), and when that unit dies, it looks like the hero dies, but it's actually the unit. |
| 07-07-2003, 05:45 PM | #13 |
Uhh did you read my thingy through? I'll put it so it's easier to understead. When a hero dies, put it in a unit array called DeadHeroes and give it a number that's not already being used by another dead hero (make it generate a random number from 1 to 100000 and the chances of them matching would be tiny). Then set a custom unit value on a corpse of that number. That'll keep track that the corpse is linked to that hero. When the corpse is resurrected or animated, the game will check it's unit value and then will revive DeadHeroes[unit value] and replace the revived corpse with that hero. This should work, right? |
| 07-07-2003, 06:27 PM | #14 |
Guest | a tiny chance is still a chance.. better method would be to loop through the array until you find an empty position, and then use that one.. and yes, that'd work.. it's what I was sayin earlier |
