a3_exile_occupation/scripts/reactions/getIn.sqf

30 lines
667 B
Plaintext
Raw Normal View History

2016-04-02 19:06:53 +00:00
// Triggered if a player gets in a captured AI vehicle
// Marks the vehicle as claimed by a player and frees up a slot to spawn another AI controlled vehicle
_unit = _this select 0;
if(isPlayer _unit) then
{
_vehicle = vehicle _unit;
[_vehicle] call SC_fnc_vehicleDestroyed;
2016-04-02 19:06:53 +00:00
if(SC_extendedLogging) then
{
_logDetail = format ["[OCCUPATION:claimVehicle]:: Unit %3 has claimed vehicle %2 at %1",time,_vehicle,_unit];
[_logDetail] call SC_fnc_log;
};
}
else
{
if(SC_debug) then
{
{ deleteVehicle _x; } forEach attachedObjects _unit;
};
2016-04-26 09:29:50 +00:00
if(damage _vehicle > 0) then
{
[_vehicle] call SC_fnc_repairVehicle;
};
2016-04-27 10:09:01 +00:00
};