a3_exile_occupation/scripts/reactions/getOut.sqf
second_coming 1c48de5f5e V31 Roll Back
Problems with versions after this which caused out of memory errors
2016-05-04 09:57:54 +01:00

32 lines
689 B
Plaintext

// Triggered if an AI unit leaves an AI vehicle
_unit = _this select 0;
_vehicle = _this select 2;
_driver = _vehicle getVariable "SC_assignedDriver";
_arrowClass = "Sign_Arrow_F";
if(!alive _unit) exitWith {};
if(side _unit == SC_SurvivorSide) then
{
_arrowClass = "Sign_Arrow_Green_F";
}
else
{
_arrowClass = "Sign_Arrow_F";
};
if(_unit == _driver) then
{
_arrowClass = "Sign_Arrow_Yellow_F";
};
if(SC_debug && alive _unit && vehicle _unit != _unit) then
{
_tag = createVehicle [_arrowClass, position _unit, [], 0, "CAN_COLLIDE"];
_tag attachTo [_unit,[0,0,0.6],"Head"];
}
else
{
{ deleteVehicle _x; } forEach attachedObjects _unit;
};