i'm having a problem with the revive technique i want to use in my RPG map and hope that someone has an idea how to make it.
So basically a hero that dies will stay at the position he is and u have 20 seconds to revive him, otherwise hes definately dead and will respawn at the town center. You maybe know the 2nd to last mission in the campaign where you can play the heros in the tunnel mission. To get this effect I add an behavior that makes the unit immune to damage if the hit was "fatal". This starts an "Apply behavior" effect which start another behavior which lasts 20 seconds and after it expires the unit will be revived with an effect.
Here comes the problem: with the way its implemented in the campaign, the hero will definately respawn after those 20 seconds. I want to change it so that if no one cast the "Revive-Spell" the hero will be dead. When revive on the hero is casted he will be alive again where he died with some fresh HP:
So does anyone have an idea how to implement this?
I will check this when I get home, but right off the top of my head I'd say you can replace the auto-resurrect effect/behavior with the "kill" effect/behavior used by e.g. the "Timed Life" behaviors.
I suppose you use the behavior "Valerian02a - Hero Death Prevention"? If you do it should be pretty straight forward.
Find the behavior "Valerian02a - Hero Death Prevention" in the Data Editor
Select the behavior "Valerian02a - Incapacitated" in the reference section (bottom-left corner)
Under "Effect - Expire Effect" you simply add the effect "Kill (Generic Kill Command)", replacing the "Valerian02a - Incap Heal" effect.
That should about do it.
If you revive the Hero before the 20 sec have passed just remove the "Valerian02a - Incapacitated" behavior and the expire effect will never occur.
In case the "Kill (Generic Kill Command)" effect doesn't kill the unit, but merely forces it to become incapacitated once more (since the unit does have the death prevention behavior), you must remove this behavior first and then fire the kill command.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello,
i'm having a problem with the revive technique i want to use in my RPG map and hope that someone has an idea how to make it.
So basically a hero that dies will stay at the position he is and u have 20 seconds to revive him, otherwise hes definately dead and will respawn at the town center. You maybe know the 2nd to last mission in the campaign where you can play the heros in the tunnel mission. To get this effect I add an behavior that makes the unit immune to damage if the hit was "fatal". This starts an "Apply behavior" effect which start another behavior which lasts 20 seconds and after it expires the unit will be revived with an effect.
Here comes the problem: with the way its implemented in the campaign, the hero will definately respawn after those 20 seconds. I want to change it so that if no one cast the "Revive-Spell" the hero will be dead. When revive on the hero is casted he will be alive again where he died with some fresh HP:
So does anyone have an idea how to implement this?
@Chriggix: Go
I will check this when I get home, but right off the top of my head I'd say you can replace the auto-resurrect effect/behavior with the "kill" effect/behavior used by e.g. the "Timed Life" behaviors.
I suppose you use the behavior "Valerian02a - Hero Death Prevention"? If you do it should be pretty straight forward.
That should about do it.
If you revive the Hero before the 20 sec have passed just remove the "Valerian02a - Incapacitated" behavior and the expire effect will never occur.
In case the "Kill (Generic Kill Command)" effect doesn't kill the unit, but merely forces it to become incapacitated once more (since the unit does have the death prevention behavior), you must remove this behavior first and then fire the kill command.