HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Reicarnation Undetectable?

06-29-2008, 05:07 AM#1
PenguinEmperor
Okay, I added extra lives as an item. I have it so each life adds one charge to an item. If you have this item, you will have re-incarnation. If you die, it should loose a charge. BUT, it seems nothing can detect re-incarnation, therefore giving the player unlimited lives as no charges are dropped.

So please, I need some help. What possibly detects re-incarnation?
06-29-2008, 05:11 AM#2
Vexorian
You got control of the circumstances, you could just do the revival manually.

But reincarnation is quite detectable. You just need to tag units that might reincarnate at the time they die. For example, add them to a unit group. Then detect the LIFE over 0.405 specific event. Verify if they have the tag, if they don't, reincarnation was in action.

With something like this is also possible to detect the very moment a unit dies with reincarnation, you probably need a timer as well though. But I think you just want to detect it after the unit has reincarnated, right?
06-29-2008, 05:15 AM#3
PenguinEmperor
Yes, I just want to detect if the unit dies with re-incarnation. Because Unit Diesevents don't work if it has the ability.
06-29-2008, 05:18 AM#4
Vexorian
There you go then I have already told you how.
06-29-2008, 05:22 AM#5
PenguinEmperor
Yup. Thanks. I don't know why I didn't think of using Life Equals.
06-29-2008, 11:37 AM#6
Anitarf
The problem with that is that based on my testing when I was working on the problem years ago, the unit dies event doesn't always run before the unit's life less than x event.If I remember correctly it was something lame like it always working except the first time the unit died, I haven't really been able to come to the bottom of it at the time, so this might just be FUD, but I do remember it really annoying me at the time.
06-29-2008, 06:24 PM#7
Strilanc
The reason it doesn't set off the death event is because the game doesn't think of reincarnating units as having 'died', it's more like they're temporarily hidden. In melee you don't get experience or a hero kill if the hero you just "killed" has an ankh.
06-29-2008, 06:35 PM#8
Captain Griffen
Quote:
Originally Posted by Strilanc
The reason it doesn't set off the death event is because the game doesn't think of reincarnating units as having 'died', it's more like they're temporarily hidden. In melee you don't get experience or a hero kill if the hero you just "killed" has an ankh.

That's not actually what Anitarf is refering to.

When a unit not to be reincarnated dies, sometimes life falls below 0.405 before it dies, sometimes afterwards.
06-29-2008, 06:46 PM#9
Strilanc
Quote:
Originally Posted by Captain Griffen
That's not actually what Anitarf is refering to.

When a unit not to be reincarnated dies, sometimes life falls below 0.405 before it dies, sometimes afterwards.

I wasn't replying to Anitarf, just commenting on the thread in general.
06-29-2008, 07:13 PM#10
Vexorian
Quote:
The problem with that is that based on my testing when I was working on the problem years ago, the unit dies event doesn't always run before the unit's life less than x event
That's the reason you got to detect the "life greater than" event instead.
06-29-2008, 07:47 PM#11
Anitarf
Hmm... right! It seems I read your original post just a bit too quickly.
This also detects when the unit actualy ressurects, rather than when it dies with ressurection, which is more useful.
06-29-2008, 08:06 PM#12
chobibo
Someone used that technique on wc3jass, on his Damage Detection system, to detect units that are resurrected, uses dynamic triggers though.
06-29-2008, 08:12 PM#13
ShadowWolf
Can you make reincarnation give a buff to the unit after it is revived?
06-29-2008, 08:21 PM#14
chobibo
You could add a dummy buff, Anitarf knows better about buffs.