Jump to content
Sign in to follow this  
dalia

Stop fcn anim ambient when recrut unit

Recommended Posts

Hi all,

 

So i'm trying to add

Quote

the player call BIS_fnc_ambientAnim__terminate;

at this script who is in the init :

 

Quote

[] spawn {
  if (!hasInterface) exitWith {};
  waitUntil {!isNull player};
  while {true} do {
    {
      _x setVariable ["addedAction",true];
      _x setVariable ["oldGrp",if (group _x == group player) then [{grpNull},{group _x}]];
      _x addAction [if (group player isEqualTo group _x) then [{"Leave my squad"},{"Join my squad"}], {
        params ["_unit","_player","_id"];
        _ActMenu = (_unit actionParams _id) select 0;
         _unit setUserActionText [_id,_ActMenu];
        if (_ActMenu isEqualTo "Join my squad") then {
          _ActMenu = "Leave my squad";
          [_unit] join group _player;
        } else {
          _ActMenu = "Join my squad";
          [_unit] join (_unit getVariable ["oldGrp",grpNull]);
        };
        _unit setUserActionText [_id,_ActMenu];
      },nil,0.8,false,true,"side _this isEqualTo side _target"];
    } forEach (allunits select { !(_x getVariable ["addedAction",false]) && !isPlayer _x});
    sleep 2;
  };
};

 

My goal is the players can recruit all IA frendly unit, but when they are in the anim they cannot move. i tried the _x call BIS_fnc_ambientAnim__terminate; but it's not working

 

thx

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  

×