Bug #11702

FirstAid / AIS / BC Modules - Do Not Work w/ Respawn

Added by Rommel almost 7 years ago. Updated about 4 years ago.

Status:Assigned Start date:07/05/2010
Priority:Normal Due date:05/10/2011
Assignee:Dwarden % Done:


Category:BI Modules
Target version:-
Affected ArmA II version:1.57.76815 First affected build:
Reproduced by another DH user:No First affected ArmA II version:
I am using some Mods:No Single / Multi Player?:
I am using: BIForumURL:
Reproducible for you:No NGUrl:
Related to content of DLC: WIKIurl:


As the title says, none of the modules are working correctly after respawn, this is because the actions and eventhandlers and scripts are only running for the previous units as per the sync states. The modules to work with JIP; unless said person died.

My fix below incorporates a small system which fixes all 3 modules by re-initializing the systems after a player dies, and ensuring JIPs are aware of the new units (ref BIS_FA_MPFixArray).
Overall the fixes are:

  • AIS/FA Respawn Support
  • Battlefield Clearance Respawn Support
  • Further JIP Support to integrate respawn
  • FSM Fixes for AIS (through setFSMVariable)

Hopefully you either:

a) Take inspiration from this

b) Use this somewhere



if (isserver) then {
    BIS_FA_MPFixArray = [];
    publicVariable "BIS_FA_MPFixArray"; // init across network

waituntil {not isnull player}; //ensure JIP

//BIS_FA_MPFixArray is the JIP array, to track all AIS players
//BIS_FA_MPFix_newunit is the unit that just died and is to be re-initialised

sleep 1;

BIS_fnc_FA_MPFix_initUnit = {
    private "_unit";
    _unit = _this;
    if (isserver) then {
        //remove dead old units
        BIS_FA_MPFixArray = BIS_FA_MPFixArray - [objnull];
        {if (not alive _x) then {BIS_FA_MPFixArray = BIS_FA_MPFixArray - [_x]}} foreach BIS_FA_MPFixArray;
        BIS_FA_MPFixArray = BIS_FA_MPFixArray + [_unit]; //add new unit
        publicvariable "BIS_FA_MPFixArray"; //broadcast
    if (local _unit) then {
        private "_aish";
        _aish = _unit getvariable "BIS_IS_agonyHandle"; //check if agony script already running
        if (not isnil {_aish}) then {
            _aish setFSMVariable ["who",player]; //fix the re-assignment, so it updates to new player object
        } else {
            [_unit] execFSM BIS_AIS_path + "data\fsms\agony.fsm"; // it hasn't started? restart it
        _unit addEventHandler ["animStateChanged", "_this execFSM BIS_BC_Path + BIS_PATH_FSM + 'animHandler.fsm'; _this execFSM BIS_BC_Path + BIS_PATH_FSM + 'animHandlerNon.fsm'"];
        _unit setVariable ["BIS_BC_animHandlerStarted",true];
    _unit setVariable ["BIS_BC_HASACTIONS", false]; //reset so actions can be added to new unit TODO: remove actions on old unit
    [_unit] execVM BIS_BC_Path + BIS_PATH_SQF + "BC_addActions.sqf";
    [_unit] execVM BIS_FA_Path + BIS_PATH_SQF + "FA_addActions.sqf";

        if (isnil {_unit getvariable (_x select 0)}) then { //init variables, don't override (incase unit is currently injured or needing to be dragged)
            _unit setVariable _x;
    } foreach [

"BIS_FA_MPFix_newunit" addPublicVariableEventHandler {
    (_this select 1) call BIS_fnc_FA_MPFix_initUnit;

BIS_fnc_FA_MPFix_killed = {
    waituntil {alive player};
    player call BIS_fnc_FA_MPFix_initUnit; //init for the player

    BIS_FA_MPFix_newunit = player;
    publicVariable "BIS_FA_MPFix_newunit"; //init remotely

player addEventHandler ["Killed",{
    [] spawn BIS_fnc_FA_MPFix_killed;

if (not isnil "BIS_FA_MPFixArray") then { //JIP fix
    if (count BIS_FA_MPFixArray > 0) then {
            _x call BIS_fnc_FA_MPFix_initUnit; //init all units in the array
        } foreach BIS_FA_MPFixArray;

firstaid.desert_E.zip (2.5 kB) Rommel, 07/05/2010 10:46

testfirstaidmissions.zip (3 kB) Mr.Ben, 03/12/2011 16:54

RespawnMedicBug.Desert_E.pbo (5.4 kB) EDcase, 04/22/2011 13:16

Related issues

related to BIS Module Improvement Project - Task #18266: Implement FirstAid / AIS / BC Module patch New 03/15/2011


Updated by kju almost 7 years ago

  • Due date set to 10/01/2010
  • Status changed from New to Assigned
  • Assignee set to Dwarden

Updated by Dwarden almost 7 years ago

  • Target version set to Upcoming version

Updated by Rommel almost 7 years ago

Very sketchy in 72018, it doesn't even work basically.


Two units down, synced to the FA modules. Load. Play. Kill. No FA effects at all, 50% chance (worked in 3/6 tests) of the server player working. 50% chance of it working on a JIP player, however handleheal EH is applied, so I can only see the first aid action.

Updated by Rommel almost 7 years ago

The damage handler appears to work... atleast your kills are not "Rommel was Killed" instead of "Rommel was killed by Dwarden"

Updated by Mr.Ben over 6 years ago

I was wondering what the news was on this bug ticket?

I and my community really love the BI first aid systems. I would love for this to be working with JIP. We operate on the idea that when you are dead, you are dead, and wait till the next round. Therefore we suffer this bug when players JIP. The symptoms I have seen are that, when a player JIP's, he can administer first aid to other injured people but cannot recieve it.

Interestingly, I did some test a while ago. When a player JIPed, and I was currently playing the mission, when i died, and respawned (via a cheat method, not sure if you knew this, but if you go back to the lobby, and don't select a new player and press ok, you join as your old self at the spawn!), both me and the other player could administer first aid. If he then died, and respawned... I try to heal him, i can't. So I he kills himself, respawns, and then i can heal him, and he me. Seems to be some kind of sync problem of some kind from what i can see? I have reproduced this bug scenario. It was using Arma2, 1.07 patch.

The JIP bug of not being able to heal new players still exists in both Arma2 and OA current patches and beta patches. I hope this can be resolved soon. There are quite a few different kind of scripts out there, that solve this issue, by making their own versions. But none are as nice as the stock games.

Updated by Fireball over 6 years ago

  • Due date changed from 10/01/2010 to 01/10/2011
  • Status changed from Assigned to Feedback
  • Assignee changed from Dwarden to Rommel

Is this fixed/implemented meanwhile?

Updated by Rommel over 6 years ago

  • Assignee deleted (Rommel)

Unable to test at this time.

Updated by kju over 6 years ago

  • Status changed from Feedback to Expired
  • Target version deleted (Upcoming version)

Feel free to reopen if still true.

Updated by Mr.Ben over 6 years ago

It is still present in 1.57 and the 1.57 beta's. I can confirm this.

From rommels first post, I can also confirm that this does fix the respawn bug. However, it does not fix the bug for a player who is joining the game part way through. He still suffers from this bug, at least on the first injury, until he respawns ( if you are running respawn that it ).

This is still a major bug IMO. My commnunity still uses it, beacause it's a brilliant system. But we suffer from it regularly. I really hope it gets fixed soon.

Updated by Fireball over 6 years ago

  • Due date changed from 01/10/2011 to 05/10/2011
  • Status changed from Expired to Assigned
  • Affected ArmA II version changed from 1.52.71816 to 1.57.76815

Keeping open until we can verify with 1.59.

Updated by kju over 6 years ago

  • Assignee set to Dwarden
  • CPU deleted (E6750 @ 3.2)
  • Audio card deleted (Please specify!)
  • Size of OS swap file deleted (Please specify!)

This needs a simple demo mission with repro steps.

Updated by Mr.Ben over 6 years ago

This needs a simple demo mission with repro steps.

Would you like me to make some to test? With various syncronizing methods?

Updated by Fireball over 6 years ago

Go ahead, make the tests and attach a mission created on Utes or Desert with repro instructions here.

Updated by Mr.Ben over 6 years ago


Here are 3 test missions for the first aid simulation, action,and battlefireld clearance. In them are three different synchronisation methods:

1. Synchronizes by "this synchronizeObjectsAdd playableunits" in the init of each module.
2. Synchronizes by using the synchronizing tool in the editor, from each module to the group leader.
3. Synchronizes by using the synchronizing tool in the editor, from each module to each unit.

We have tried all three ways and all produce the problem that the player who enters the mission once it has begun suffers from not being able to be healed by existing players. The same applies once a player respawns, even if he had been there when the mission was started.

Repro steps:


1. one to three people start the mission together.
2. allow a new player to join the game.
3. shoot the new player to cause injury.
4. Try and heal him. This will not work. (FYI, if existing players are injured, the new player should be able to heal them though).


1. All players start together.
2. kill one player, so that he respawns.
3. shoot the respawned to cause injury.
4. Try and heal him. This will not work.

I hope this is clear, and helps?

Updated by EDcase about 6 years ago

Using 1.59 Combined Arms

First Aid module does not work in MP with respawn.
After 1st death enemy no longer see player.

Updated by EDcase about 6 years ago

Attached sample mission.

-Run forward and attract enemy attention then get shot. (If wounded ESC and respawn)
-Run forward again and you are now invisible to enemy

Updated by galzohar about 6 years ago

It seems like basically all the bugs that were always there, are still here:

- Player may turn captive after respawn

- Player may get in "agony" state but still able to run around

- Player may get un-healable. Action may or may not show when this happens, but in both cases player cannot be healed.

- Player may get weird glitches after being dragged/carried

The latter 3 can happen even without any respawn/JIP.

Also available in: Atom PDF