- Joined
- Jul 28, 2013
- Messages
- 768
Hello guys, is there a possible way to replace the unit that died and has Reincarnation ability with another unit, after the reincarnation delay?
Unfortunately a unit with reincarnation does not die, if it is not on cooldown, so it won't fire the "a unit dies"-event. If you use the event from GUI unit event instead it should work.I think there's a better way to do this, but you can check if the unit which has been killed
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.finished casting = reincarnation would that do?
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.Or trigger that checks if a unit got attacked then checks if its hp is below 1
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.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.