由于AA3中不再默认自带para.sqs脚本,于是乎改良了 一下,适合AA3空降的脚本,改良基础是AA2的WCRffsx_fnc_Para.sqf脚本,使用方法:触发时:Para = [空降队长,飞机] execVM "AA3-WCRffsx_fnc_Para.sqf";
- /*FileName: WCRffsx_fnc_Para.sqf
- Author: WCR
- Effects: This is the script which can make a squard which is staying in a flying plane eject.
- Usage: Para = [GroupLeaderName,PlaneName] execVM "WCRffsx_fnc_Para.sqf";
- Creating Date: 3 Jan 2011
- Version 1.03
- //[1900] call BIS_fnc_setHeight;
- //waitUntil {getPosATL _WCRffsx_Arrary select 2 < 200};
- */
- private ["_WCRffsx_ParaLeader","_WCRffsx_Plane","_WCRffsx_ParaGroup","_WCRffsx_Arrary","_WCRffsx_Sum","_WCRffsx_Index"];
- _WCRffsx_ParaLeader = _this select 0;
- _WCRffsx_Plane = _this select 1;
- _WCRffsx_ParaGroup = group _WCRffsx_ParaLeader;
- _WCRffsx_Arrary = units _WCRffsx_ParaGroup;
- _WCRffsx_Sum = count _WCRffsx_Arrary;
- _WCRffsx_Index = 0;
- if ((isNull _WCRffsx_Plane) || (isNull _WCRffsx_ParaGroup) || (isNull _WCRffsx_ParaLeader)) then {
- if (true) exitWith {
- hintSilent "If this script cannot run properly in MP, please check whether you've disabled AI.\nIf this script cannot run in SP, please check whether any variable is null.";
- sleep 1;
- };
- } else {
- if ({_x in _WCRffsx_Plane} forEach _WCRffsx_Arrary) then {
- sleep 0.1;
- _WCRffsx_Plane FlyInHeight 300;
- sleep 0.1;
- if (alive _WCRffsx_Plane) then {
- while {_WCRffsx_Sum > _WCRffsx_Index} do {
-
- (_WCRffsx_Arrary select _WCRffsx_Index) action ["eject",_WCRffsx_Plane];
- unassignvehicle (_WCRffsx_Arrary select _WCRffsx_Index);
- (_WCRffsx_Arrary select _WCRffsx_Index) addBackpack "B_Parachute";
- 0 = (_WCRffsx_Arrary select _WCRffsx_Index) spawn {waitUntil {getPosATL _this select 2 < 100}; _this action ["openParachute"];};
- _WCRffsx_Index = _WCRffsx_Index + 1;
- sleep 1;
- };
- } else {
- if (true) exitWith {
- hintSilent "WCRffsx_fnc_iPara is not available currently, please check whether the carrier has enough capacity to hold the paratroops";
- sleep 0.1;
- };
- };
- } else {
- if (true) exitWith {
- hintSilent "Some of the paratroops are not stay in the cabin.";
- sleep 0.1;
- };
- };
- };
复制代码 |