Jump to content
Sign in to follow this  

Damage Handling (ACE)

Recommended Posts

I'm tinkering around with an ACE-friendly version of Blackout's CQB Shoot-house , but I have no clue how to actually keep the player from dying and wake them instantly upon being downed.


Long story short, it's an SP scenario (no teammates), you go in, if you are about to take fatal damage, you instantly get healed up (via the below script) and the round resets.

// Get old and new Player damage
_current_damage = damage player;
_new_damage = _current_damage + _reduced_damage_taken;

// Update player damage
if(_new_damage > _current_damage and _current_damage < 1) then {
    if(_new_damage >= 1) then {

        // Going to die, trigger game over
        player allowDamage false;
        null = ["Mission failed! You were killed"] execVM "scripts\end_round.sqf";
    } else {
        // Apply damage to player...

end_round.sqf calls "ace_medical_treatment_fnc_fullHealLocal" to restore the player's health fully and remove all wounds.


However, there are still 3 problems:

  1. There are times where the player still gets insta-killed despite the script supposedly checking for fatal damage.
  2. The player can sometimes go unconscious. Even though he wakes up soon after getting healed up, I'd rather not have those 2-3 seconds of a black screen.
  3. Even on the mission setting that disables all damage, you can still be inflicted wounds.


Is there a work-around for these problems?

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
Sign in to follow this