• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Replace unit after Reincarnation

Status
Not open for further replies.
I think there's a better way to do this, but you can check if the unit which has been killed has reincarnate and if so whether its alive (reincarnate has worked) a few seconds later and then replace it
 
@Jampion I didn't know, what about ability finished casting = reincarnation would that do?
Or trigger that checks if a unit got attacked then checks if its hp is below 1
 
If it's going to be replaced anyway, why even use the reincarnation ability? Let the unit die normally which is very easy to detect with triggers, play the reincarnation special effects, spawn the new unit after a delay, and remove the old unit's corpse.
 
I mean, GUI Unit Event is the easiest way to do this by far. Since the aank effect and else will already occur and you only would be Replacing after it revives

If you use a dummy abil and Unit dies event, then you have to create the sfx of the aank, remove the corpse, save needed values, use timers to wait, and then creating the new unit
It just too long.
 
finished casting = reincarnation would that do?
Does not work either. Passive abilities usually don't have cast events. The only reason for GUI unit event to exist is to emulate events, that are not possible through normal events, but are very useful.
Or trigger that checks if a unit got attacked then checks if its hp is below 1
A unit is attacked event fires, when the attacker starts the attack animation, so you can still cancel it and no actual attack happens. You can use: attack-stop-attack-stop.. very quickly to fire multiple attack events in one second.
You usually use a Damage Detection System (DDS) to detect if a unit takes damage, because it's much more reliable. However this still does not work, because units can die without taking damage. Examples are instant kill skills (at least I think they don't deal damage): death pact, dark ritual, transmute
And negative regeneration: phoenix, unholy frenzy

If it's going to be replaced anyway, why even use the reincarnation ability? Let the unit die normally which is very easy to detect with triggers, play the reincarnation special effects, spawn the new unit after a delay, and remove the old unit's corpse.
This is a good solution, unless it's important, that the unit does not die. As I said reincarnated units do not fire the death event, so it won't be counted as a kill and it won't give gold or experience. Same problem with the hydra ability.
So basically if you actually wan't the unit to die (give gold, drop items, give experience, fire death event) and after that replace it you can use hydra ability or Kaiyuu's solution.
 
I was gonna say use the pheonix's morphing ability to morph the unit then replace whatever it got morphed into, but the hydra thing seems way better
 
Status
Not open for further replies.
Back
Top