Jump to content
Sign in to follow this  
sion

removeAction and BIS_fnc_MP

Recommended Posts

Hello guys

I have a small problem and hope u guys can help me solving it...

Im writing a script wich spawns an evac Helicopter and waits at evac position until an action in action menu is activated.

everything is working but the action wont be removed.

The script should work on MP

Here is the Script:

fnc_startorder= {
private ["evac_heli"];
evac_heli = _this select 0;
startorder = evac_heli addAction ["<t color='#FF0000'>Heli abheben lassen</t>", {start_ok = true; publicVariable "start_ok";}];
};

fnc_startorder_remove= {

player removeAction startorder;
};


if (!isServer) exitWith {};  



   _spawnPos = getmarkerpos "evac_spawn";
   _evac_pos = getPos evac_zone;
   _evac_pos2 = getmarkerpos "evac_end";
   start_ok = false;

   //Spawn Heli
   _heli = [_spawnPos, 180, "B_HELI_TRANSPORT_01_CAMO_F", WEST] call bis_fnc_spawnvehicle;
   heli_obj = _heli select 0;
   _heli_grp = _heli select 2;


   //Waypoint zu EvacZone
   _waypoint1 = _heli_grp addWaypoint [ _evac_pos, 12];
   _waypoint1 setWayPointBehaviour "CARELESS";
   _waypoint1 setWayPointSpeed "NORMAL";
   _waypoint1 setWayPointType "LOAD";
   _waypoint1 setWayPointCombatMode "WHITE";
   _waypoint1 setWaypointStatements ["true","heli_obj land ""GET IN"";"];


   [[heli_obj],"fnc_startorder",true,true] spawn BIS_fnc_MP;

   waitUntil {start_ok};
   [[],"fnc_startorder_remove",true,true] spawn BIS_fnc_MP;

   _waypoint2 = _heli_grp addWaypoint [_evac_pos2, 12];
   _waypoint2 setWayPointBehaviour "CARELESS";
   _waypoint2 setWayPointSpeed "NORMAL";
   _waypoint2 setWayPointType "MOVE";
   _waypoint2 setWayPointCombatMode "WHITE";

Share this post


Link to post
Share on other sites

Why are you removing the action from player? Evac_heli has the action, not player.

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  

×