Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Author: Skullfox
- Description:
- Attaches a pod to "Land_corridorpod"
- Parameter(s):
- 0 Object: POD
- 1 (Optional) Object: Corridor
- Returns:
- nothing
- [pod] execVM "fn_attachPod.sqf";
- [pod,corridor] execVM "fn_attachPod.sqf";
- */
- _pod = param[0,objNull];
- _corridor = param[1,false];
- if(_corridor isEqualTo false)then{
- _corridors = nearestObjects [_pod, ["Land_corridorpod"],12];
- if( (count _corridors) isEqualTo 0 )exitWith{};
- if( count _corridors > 1)exitWith{};
- _corridor = _corridors select 0;
- };
- _pod attachTo [_corridor, [0,9,0]];
- [
- _pod,
- "<t color='#FF0000'>DETACH</t>",
- "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
- "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
- "driver _target == player",
- "driver _target == player",
- {
- params ["_target", "_caller", "_actionId", "_arguments"];
- _crew = crew _target;
- {
- if(isPlayer _x)then{
- ["Detach in progress"]remoteExec["hint",owner _x];
- };
- } forEach _crew;
- },
- {
- params ["_target", "_caller", "_actionId", "_arguments", "_progress", "_maxProgress"];
- },
- {
- params ["_target", "_caller", "_actionId", "_arguments"];
- playSound3D ["A3\Missions_F_Bootcamp\data\sounds\assemble_target.wss", _target];
- detach _target;
- [_target]spawn{
- sleep 1;
- _effect = {
- _handle = ppEffectCreate ["radialBlur",100];
- _handle ppEffectEnable true;
- _handle ppEffectAdjust [0.04,0.05,0.35,0.2];
- _handle ppEffectCommit 1;
- waitUntil {ppEffectCommitted _handle};
- uiSleep 1;
- _handle ppEffectAdjust [0.0,0.0,0,0];
- _handle ppEffectCommit 0.5;
- waitUntil {ppEffectCommitted _handle};
- _handle ppEffectEnable false;
- ppEffectDestroy _handle;
- };
- {
- if(isPlayer _x)then{
- [[],_effect]remoteExec["BIS_fnc_spawn",owner _x];
- };
- } forEach crew (_this select 0);
- _vel = velocity (_this select 0);
- _dir = direction (_this select 0);
- _speed = 50; comment "Added speed";
- (_this select 0) setVelocity [
- (_vel select 0) + (sin _dir * _speed),
- (_vel select 1) + (cos _dir * _speed),
- (_vel select 2)
- ];
- }
- },
- {},
- [],
- 4,
- 10,
- true,
- false
- ] remoteExec ["BIS_fnc_holdActionAdd", 0];
- [
- _pod,
- "<t color='#FF0000'>EMERGENCY CHUTE</t>",
- "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
- "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
- "driver _target == player && speed _target > 200 && ( (getpos _target select 2) < 300 )",
- "driver _target == player",
- {
- params ["_target", "_caller", "_actionId", "_arguments"];
- },
- {
- params ["_target", "_caller", "_actionId", "_arguments", "_progress", "_maxProgress"];
- },
- {
- params ["_target", "_caller", "_actionId", "_arguments"];
- playSound3D ["A3\Missions_F_Bootcamp\data\sounds\assemble_target.wss", _target];
- [_target]spawn{
- playSound3D ["A3\Missions_F_Bootcamp\data\sounds\assemble_target.wss", (_this select 0)];
- _p = createVehicle ["B_Parachute_02_F", getpos (_this select 0), [], 0, ""];
- _d = getdir (_this select 0);
- (_this select 0) attachTo[_p,[0,0,0]];
- (_this select 0) setDir _d;
- sleep 2;
- _effect = {
- _handle = ppEffectCreate ["radialBlur",100];
- _handle ppEffectEnable true;
- _handle ppEffectAdjust [0.04,0.05,0.35,0.2];
- _handle ppEffectCommit 1;
- waitUntil {ppEffectCommitted _handle};
- uiSleep 1;
- _handle ppEffectAdjust [0.0,0.0,0,0];
- _handle ppEffectCommit 0.5;
- waitUntil {ppEffectCommitted _handle};
- _handle ppEffectEnable false;
- ppEffectDestroy _handle;
- };
- {
- if(isPlayer _x)then{
- [[],_effect]remoteExec["BIS_fnc_spawn",owner _x];
- };
- } forEach crew (_this select 0);
- [(_this select 0),0]remoteExec["setfuel",0];
- waitUntil{getpos (_this select 0) select 2 < 2};
- detach (_this select 0);
- };
- },
- {},
- [],
- 1,
- 10,
- true,
- false
- ] remoteExec ["BIS_fnc_holdActionAdd", 0];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement