HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detecting Reincarnaition

06-25-2006, 09:59 AM#1
Freakazoid
How can I detect Reincarnaition. Let's say when a unit triggers Reincarnaition, i want bunch of stuff going on?
06-25-2006, 10:03 AM#2
Captain Griffen
Unit's life falls below 0.
06-25-2006, 10:33 AM#3
Jacek
OK 2 ways I know of:

1. http://wc3jass.com/viewtopic.php?t=1996 ... basic, just a script

2. Give your hero Spawn Hydra ability (the one after death)... now make a trigger, so when hero is dead and there are hydras, then remove them and reincarnation didn't fire. If hero is dead and there are no hydras then it means hero reincarnated.
06-25-2006, 12:32 PM#4
StockBreak
Quote:
Originally Posted by Jacek
2. Give your hero Spawn Hydra ability (the one after death)... now make a trigger, so when hero is dead and there are hydras, then remove them and reincarnation didn't fire. If hero is dead and there are no hydras then it means hero reincarnated.
This is wrong, because you cannot detect a dying unit with reincarnation, the event simply won't fire.
The best way is to create a JASS trigger, using the specific unit event "Unit HP" when hit points are <= 0.
06-25-2006, 12:36 PM#5
Jacek
Aren't units dead at hp around ~0.8? ;S
06-25-2006, 12:39 PM#6
PipeDream
Use unit is damaged or is attacked. That variable stuff is.. sketchy.

Yeah, at .405013 or so.
06-25-2006, 12:45 PM#7
StockBreak
Quote:
Originally Posted by PipeDream
Actually it does work. The event fires once the ability is on cooldown and the unit dies.

Yeah, at .405013 or so.
If a unit has Reincarnation (or a similar ability), using the generic unit event " Any Unit Dies", the trigger won't fire if the unit has the cooldown ready for Reincarnation, test it by yourself.
06-25-2006, 12:56 PM#8
PipeDream
Yea, so use whatever other event.
06-27-2006, 10:13 AM#9
Freakazoid
Ok. So I can use the Unit's life falls below 0 event and check if the unit is alive in the next 5 seconds?
06-27-2006, 10:18 AM#10
Rising_Dusk
If you want to do it that way.
It would also work with a 1 second delay or whatever too.
You've got options. :P
06-27-2006, 01:27 PM#11
PipeDream
Turns out Vex worked out the details awhile ago. TriggerAddReincarnationEvent
06-27-2006, 01:48 PM#12
shadow1500
Pipe, jacek already posted this script on 1st post.
06-27-2006, 02:07 PM#13
Jacek
ya!!! I was first
06-27-2006, 02:14 PM#14
PipeDream
Oh. We were talking about it days ago and I've been wondering this whole time why he didn't post it ;) Mystery solved