HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

revive unit and make triggers think it died

06-30-2006, 05:23 PM#1
evilmapcreater
heres my problem, i have triggers set for a unit, one event in the triggers is when they die (thats not important i dont think). when a unit dies i want to, make triggers think it died and then revive it. i tried giving it reincarnation ability but triggers wont think it died.
06-30-2006, 06:09 PM#2
Naakaloh
The idea behind the reincarnation ability is that when a unit is reduced to 0 life, it doesn't die. Instead, it uses the ability and restores it's life, so if it has reincarnation it would make sense that the trigger is not firing.
06-30-2006, 06:13 PM#3
The)TideHunter(
Quote:
Originally Posted by Naakaloh
The idea behind the reincarnation ability is that when a unit is reduced to 0 life, it doesn't die. Instead, it uses the ability and restores it's life, so if it has reincarnation it would make sense that the trigger is not firing.

When a unit with reincarntion dies, it definatly dies.
If any unit's life is set to 0 at any time, attack or trigger, it will die.

@ evilmapcreator - I dont understand what you mean by "make the trigger think", because unless you have took some med's today, triggers have never been able to think.
06-30-2006, 06:23 PM#4
Naakaloh
I believe he means that the event is not firing. (ie: The unit has not died; not technically anyway even though it plays it's death animation and it's life is 0 whatever.)
06-30-2006, 06:59 PM#5
Rising_Dusk
Yes, on death triggers will NOT fire if the unit has reincarnation not on cooldown.
Because I don't care if the unit is reduced to 0 life, it does not register as dead. Period.
I've tested it hundreds of times, and I can sit and guarantee what I say.
06-30-2006, 07:01 PM#6
PipeDream
Just use unit's life drops below 1 instead of event death.
06-30-2006, 08:53 PM#7
evilmapcreater
life = below 1 dosent working for my trigger because i also have killing event response set or whatever

Trigger:
add to score
Collapse Events
Unit - A unit Dies
Conditions
Collapse Actions
Set kills[(Player number of (Owner of (Killing unit)))] = (kills[(Player number of (Owner of (Killing unit)))] + 1)
Multiboard - Set the text for (Last created multiboard) item in column 2, row (Player number of (Owner of (Killing unit))) to (String(kills[(Player number of (Owner of (Killing unit)))]))

gota way i can kinda tweak it to make it work for what im saying? help realy aprceatated, exuse my spellling lol
06-30-2006, 10:00 PM#8
Naakaloh
Well, I don't know why you want the unit to be counted as being killed if it uses reincarnation, because it seems to defeat the point of using reincarnation, but, you could just give him some useless passive other than reincarnation and then trigger the revival, that way he'll be counted as dying. If you don't want to do that I think Vexorian did something that simulates an event for a unit using reincarnation which might also help you; you can probably find it at the JASS vault.
07-01-2006, 04:27 PM#9
evilmapcreater
Quote:
Originally Posted by Naakaloh
some useless passive.

like?
07-01-2006, 05:00 PM#10
Rising_Dusk
....Evasion...
07-01-2006, 05:01 PM#11
Vexorian
Can't you just remove old unit when it dies and create an identical one?
07-01-2006, 06:37 PM#12
evilmapcreater
i cant becuase i have lots for triggers for the units
07-01-2006, 06:47 PM#13
PipeDream
Quote:
ife = below 1 dosent working for my trigger because i also have killing event response set or whatever
Whenever the unit is damaged, store the damage source.