Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///////////////////////////////////////////////////
- if (_obj_type in IL_Supported_Vehicles_BLACKFISH) then
- {
- if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
- if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_BLACKFISH, true];};
- if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
- if ((isNil {_obj getVariable "can_copilot"}) || (_force)) then {_obj setVariable["can_copilot", IL_Can_CoPilot, true];};
- if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
- if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -5.75, true];};
- if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 7.5, true];};
- if ((isNil {_obj getVariable "usable_ramp"}) || (_force)) then {_obj setVariable["usable_ramp", IL_Ramp, true];};
- };
- //////////////////////////////////////////////////
- if ((_obj_type in IL_Supported_Vehicles_BLACKFISH) && (_doors == "B")) then
- {
- _sdist = IL_SDistL + IL_SDistL_Heli_offset;
- _spoint = _v modelToWorld [0,-9,-5.4];
- _box_num = _v getVariable "box_num";
- _slot_num = _v getVariable "slots_num";
- };
- ////////////////////////////////////////////////////
- if ((_obj_type in IL_Supported_Vehicles_BLACKFISH) && (_doors == "B")) then
- {
- [_v, _x, [_x_cargo_offset,-9,-0.93 + _zload], [_x_cargo_offset,-8,-0.93 + _zload], 1, _turn] call IL_Move_Attach;
- [_v, _x, [_x_cargo_offset,-7,-0.93 + _zload], [_x_cargo_offset,-3.5,_zload], 1, _turn] call IL_Move_Attach;
- [_v, _x, [_x_cargo_offset,-2.5,_zload], [_x_cargo_offset,_counter + 17 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
- };
- /////////////////////////////////////////////////////
- if ((_obj_type in IL_Supported_Vehicles_BLACKFISH) && (_doors == "B")) then
- {
- if !(_para) then
- {
- [_v, _x, [_x_cargo_offset,_counter + 9 - _cargo_offset,_zload], [_x_cargo_offset,-12.5,_zload], 1, _turn] call IL_Move_Attach;
- };
- [_v, _x, [_x_cargo_offset,-4.5,_zload], [_x_cargo_offset,-7,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
- [_v, _x, [_x_cargo_offset,-4.5,-0.75 + _zload], [_x_cargo_offset,-12.5,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
- if ((_para) && (_obj_type in IL_Para_Drop_Vehicles)) then
- {
- _last_attach_pos = [_x_cargo_offset,-10,-0.75 + _zload];
- };
- };
- //////////////////////////////////////////////////////
- if ((typeOf _v) in IL_Supported_Vehicles_BLACKFISH) then
- {
- _dist_out = 14;
- _dist_out_para = 17;
- };
- /////////////////////////////////////////////////////
- if (_obj_main_type in IL_Supported_Vehicles_BLACKFISH) then
- {
- _vsupported = true;
- [_obj_main] call IL_Init_Veh;
- _obj_main addAction [
- "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load cargo on Blackfish</t>",
- {
- [_this select 0, IL_Supported_Cargo_NonVeh_BLACKFISH] call IL_Do_Load;
- },[],IL_Action_LU_Priority,true,true,"",
- "(count(nearestObjects[ _target modelToWorld [0,-9,-5.4], IL_Supported_Cargo_NonVeh_BLACKFISH, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' == 1)"
- ];
- _obj_main addAction [
- "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load vehicle on Blackfish</t>",
- {
- [_this select 0, IL_Supported_Cargo_Veh_BLACKFISH] call IL_Do_Load;
- },[],IL_Action_LU_Priority,true,true,"",
- "(count(nearestObjects[ _target modelToWorld [0,-9,-5.4], IL_Supported_Cargo_Veh_BLACKFISH, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' == 1)"
- ];
- _obj_main addAction [
- "<t color=""#007f0e"">Get in Blackfish</t>",
- {
- (_this select 1) moveInCargo (_this select 0);
- },[],IL_Action_LU_Priority,false,true,"",
- "(_this in (nearestObjects[ _target modelToWorld [0,-9,-5.4], [], IL_SDistL + IL_SDistL_Heli_offset])) && ((_target emptyPositions 'cargo') > 0) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' > 0.43) && (_target getVariable 'usable_ramp')"
- ];
- _obj_main addAction [
- "<t color=""#ff0000"">Get out Blackfish</t>",
- {
- [_this select 0, _this select 1, false] call IL_GetOut;
- },[],IL_Action_LU_Priority,false,true,"",
- "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' > 0.43) && (_target getVariable 'usable_ramp')"
- ];
- _obj_main addAction [
- "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Eject</t>",
- {
- [_this select 0, _this select 1, true] call IL_GetOut;
- },[],IL_Action_LU_Priority,false,true,"",
- "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (((getPosATL _target) select 2) >= IL_Para_Jump_ATL) && (_target doorPhase 'Door_1_source' > 0.43) && (_target getVariable 'usable_ramp')"
- ];
- _obj_main addAction [
- "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">Unload cargo from Blackfish</t>",
- {
- [_this select 0] call IL_Do_Unload;
- },[],IL_Action_LU_Priority,false,true,"",
- "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-5.4], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' == 1)"
- ];
- _obj_main addAction [
- "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Unload cargo with parachute</t>",
- {
- [_this select 0, true] call IL_Do_Unload;
- },[],IL_Action_LU_Priority,false,true,"",
- "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target doorPhase 'Door_1_source' == 1)"
- ];
- _obj_main addAction [
- "<img image='IgiLoad\images\unload_all_para.paa' /><t color=""#a50b00"">Unload ALL cargo with parachute</t>",
- {
- while {((_this select 0) getVariable "box_num") != 0} do
- {
- [_this select 0, true] call IL_Do_Unload;
- };
- },[],IL_Action_LU_Priority,false,true,"",
- "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target doorPhase 'Door_1_source' == 1)"
- ];
- _obj_main addAction [
- "<t color=""#0000ff"">Open cargo ramp in Blackfish</t>",
- {
- _this select 0 animatedoor ['Door_1_source', 1];
- },[],IL_Action_O_Priority,false,true,"",
- "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-5.4], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target doorPhase 'Door_1_source' == 0) && (_target getVariable 'can_load')"
- ];
- _obj_main addAction [
- "<t color=""#0000ff"">Close cargo ramp in Blackfish</t>",
- {
- _this select 0 animatedoor ['Door_1_source', 0];
- },[],IL_Action_O_Priority,false,true,"",
- "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-5.4], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target doorPhase 'Door_1_source' == 1) && (_target getVariable 'can_load')"
- ];
- _obj_main addAction [
- "<t color=""#0000ff"">Enable loading for Co-Pilot</t>",
- {
- (_this select 0) setVariable["can_copilot", true, true];;
- },[],IL_Action_S_Priority,false,true,"",
- "((driver _target == _this) && !(_target getVariable 'can_copilot') && IL_Can_CoPilot)"
- ];
- _obj_main addAction [
- "<t color=""#0000ff"">Disable loading for Co-Pilot</t>",
- {
- (_this select 0) setVariable["can_copilot", false, true];;
- },[],IL_Action_S_Priority,false,true,"",
- "((driver _target == _this) && (_target getVariable 'can_copilot') && IL_Can_CoPilot)"
- ];
- _obj_main addAction [
- "<t color=""#0000ff"">Enable loading from outside</t>",
- {
- (_this select 0) setVariable["can_outside", true, true];;
- },[],IL_Action_S_Priority,false,true,"",
- "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
- ];
- _obj_main addAction [
- "<t color=""#0000ff"">Disable loading from outside</t>",
- {
- (_this select 0) setVariable["can_outside", false, true];;
- },[],IL_Action_S_Priority,false,true,"",
- "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_outside') && IL_Can_Outside)"
- ];
- _obj_main addAction [
- "<t color=""#0000ff"">Enable usable ramp</t>",
- {
- (_this select 0) setVariable["usable_ramp", true, true];;
- },[],IL_Action_S_Priority,false,true,"",
- "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'usable_ramp') && IL_Ramp)"
- ];
- _obj_main addAction [
- "<t color=""#0000ff"">Disable usable ramp</t>",
- {
- (_this select 0) setVariable["usable_ramp", false, true];;
- },[],IL_Action_S_Priority,false,true,"",
- "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'usable_ramp') && IL_Ramp)"
- ];
- };
Advertisement
Add Comment
Please, Sign In to add comment