Jump to content
Brandhor

Disallow damage while unconscious with Apex Revive

Recommended Posts

with the new apex revive system a player will die if he gets shot while unconscious, is there a way to change this? I tried to find some revive event to hook but I can't find any, the best I could do was to hook AnimChanged and set allowDamage to false when the animation is unconsciousrevivedefault but there's a bit of delay till that animation get triggered so it doesn't work too well

Share this post


Link to post
Share on other sites

Maybe chuck the allowdamage at the start of the script, I'd need to see the code.
 

Share this post


Link to post
Share on other sites

Maybe chuck the allowdamage at the start of the script, I'd need to see the code.

 

 

this is the best I could come up with but it's not perfect, for example when an helicopter crashes you are forced to respawn, I guess it's because the damage is forced with setDamage which is unblockable and the revive remastered doesn't work in that case

I guess I'll have to use a custom revive script for now

//initPlayerLocal.sqf

player addEventHandler [ "AnimChanged", {
    params[
        "_unit",
        "_anim"
    ];
if (!(player getVariable ["BIS_revive_incapacitated", false])) then {
_unit allowDamage true;
};
}];

player addEventHandler [ "HandleDamage", {
    params[
        "_unit",
        "_selection",
        "_damage",
        "_source",
        "_projectile",
        "_index"
    ];
    if (player getVariable ["BIS_revive_incapacitated", false]) then {
        _unit allowDamage false;
    };
}];

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×