Arma 3でBLUFORの米軍に配備されているUH-80 Ghost Hawkの操縦席から貨物ドアを開閉可能にしてみようというスクリプト紹介です。
操縦士と副操縦士のみが貨物ドアを開閉可能になり、アクション メニューで操作します。
使用方法は至って簡単で、スクリプトをミッション フォルダへ配置し、空のUH-80のinit欄へ下記の構文を記述します。
_hdl = [this] execVM "heliDoors.sqf";
スクリプト名は“heliDoors.sqf”。適当な空白でダブルクリックすると全選択が出来ます。
/*Script for "B_Heli_Transport_01_F" - "UH-80 Ghost Hawk"
allows only pilot/ copilot to operate doors, locks cargo if doors closed.
usage:
_hdl = [this] execVM "heliDoors.sqf";
_hdl = [heliName] execVM "heliDoors.sqf";
*/
_vcl = _this select 0;
{_vcl animateDoor [_x, 1];} forEach ["door_L","door_R"];
_vcl addAction ["[Open Doors] ",
{
{(_this select 0) animateDoor [_x, 1];} forEach ["door_L","door_R"];
(_this select 0) lockCargo false;
},"",0.1,false,true,"","(driver _target == _this || _target turretUnit [0] == _this) && ((_target doorPhase 'door_R') < 1)"]; //射手から操作させたいなら },"",0.1,false,true,"","(_target turretUnit [1] == _this || _target turretUnit [2] == _this) && ((_target doorPhase 'door_R') < 1)"];
_vcl addAction ["[Close Doors] ",
{
{(_this select 0) animateDoor [_x, 0];} forEach ["door_L","door_R"];
(_this select 0) lockCargo true;
},"",0.1,false,true,"","(driver _target == _this || _target turretUnit [0] == _this) && ((_target doorPhase 'door_R') > 0)"]; // },"",0.1,false,true,"","(_target turretUnit [1] == _this || _target turretUnit [2] == _this) && ((_target doorPhase 'door_R') < 1)"];
0 コメント:
コメントを投稿