1.Taruに次のスクリプトを適用させる。(コードは領域内ダブルクリックで全選択できます)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | (Taruの名前) addAction [ "Attach Cargo" , "taruCargoAttach.sqf" ,nil,1.5, true , true , "" ," (_this in _target) and ((count (nearestObjects [_target,[ 'Land_Pod_Heli_Transport_04_ammo_F' , 'Land_Pod_Heli_Transport_04_box_F' , 'Land_Pod_Heli_Transport_04_repair_F' , 'Land_Pod_Heli_Transport_04_fuel_F' , 'Land_Pod_Heli_Transport_04_medevac_F' , 'Land_Pod_Heli_Transport_04_bench_F' , 'Land_Pod_Heli_Transport_04_covered_F' ],3])) != 0) and (getDir ((nearestObjects [_target,[ 'Land_Pod_Heli_Transport_04_ammo_F' , 'Land_Pod_Heli_Transport_04_box_F' , 'Land_Pod_Heli_Transport_04_repair_F' , 'Land_Pod_Heli_Transport_04_fuel_F' , 'Land_Pod_Heli_Transport_04_medevac_F' , 'Land_Pod_Heli_Transport_04_bench_F' , 'Land_Pod_Heli_Transport_04_covered_F' ],3]) select 0) - (getDir _target) < 10) and (getDir ((nearestObjects [_target,[ 'Land_Pod_Heli_Transport_04_ammo_F' , 'Land_Pod_Heli_Transport_04_box_F' , 'Land_Pod_Heli_Transport_04_repair_F' , 'Land_Pod_Heli_Transport_04_fuel_F' , 'Land_Pod_Heli_Transport_04_medevac_F' , 'Land_Pod_Heli_Transport_04_bench_F' , 'Land_Pod_Heli_Transport_04_covered_F' ],3]) select 0) - (getDir _target) > -10) and (isNull (_target getVariable [ 'Taru_cargo' ,objNull])) "] ; (Taruの名前) addAction [ "Detach Cargo" ,{(_this select 0) allowDamage false ; detach ((_this select 0) getVariable "Taru_cargo" ) ; ((_this select 0) setVariable [ "Taru_cargo" ,objNull]) ; sleep 1 ; (_this select 0) allowDamage true ;},nil,1.5, true , true , "" ," (_this in _target) and (!isNull (_target getVariable [ 'Taru_cargo' ,objNull])) and speed _target < 5 and speed _target > -5 and (getPosATL _target select 2) < 5 "] ; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | _taru = _this select 0 ; _cargo = _this select 1 ; if (!isNil "_cargo" ) then { _cargo = ((nearestObjects [_taru,[ "Land_Pod_Heli_Transport_04_ammo_F" , "Land_Pod_Heli_Transport_04_box_F" , "Land_Pod_Heli_Transport_04_repair_F" , "Land_Pod_Heli_Transport_04_fuel_F" , "Land_Pod_Heli_Transport_04_medevac_F" , "Land_Pod_Heli_Transport_04_bench_F" , "Land_Pod_Heli_Transport_04_covered_F" ],3]) select 0) ; } ; if (!(typeOf _cargo in [ "Land_Pod_Heli_Transport_04_ammo_F" , "Land_Pod_Heli_Transport_04_box_F" , "Land_Pod_Heli_Transport_04_repair_F" , "Land_Pod_Heli_Transport_04_fuel_F" , "Land_Pod_Heli_Transport_04_medevac_F" , "Land_Pod_Heli_Transport_04_bench_F" , "Land_Pod_Heli_Transport_04_covered_F" ])) exitWith {} ; _slingPosX = -0.0954387 ; _zCoef = -0.236002 ; if (typeOf _cargo in [ "Land_Pod_Heli_Transport_04_ammo_F" , "Land_Pod_Heli_Transport_04_box_F" , "Land_Pod_Heli_Transport_04_repair_F" ]) then { _cargo attachTo [_taru,[ (_slingPosX), 2.36 + ((boundingBox _cargo) select 0 select 1), 0.35 + ((boundingBox _cargo) select 0 select 2) + _zCoef ]] ; } ; if (typeOf _cargo in [ "Land_Pod_Heli_Transport_04_fuel_F" ]) then { _cargo attachTo [_taru,[ (_slingPosX - 0.063), (((boundingBox _cargo) select 0 select 1) + 2.395), (((boundingBox _cargo) select 0 select 2) + 0.47) + _zCoef ]] ; } ; if (typeOf _cargo in [ "Land_Pod_Heli_Transport_04_medevac_F" ]) then { _cargo attachTo [_taru,[ (_slingPosX - 0.036), (((boundingBox _cargo) select 0 select 1) + 3.03), (((boundingBox _cargo) select 0 select 2) + 0.99) + _zCoef ]] ; } ; if (typeOf _cargo in [ "Land_Pod_Heli_Transport_04_covered_F" ]) then { _cargo attachTo [_taru,[ (_slingPosX), (((boundingBox _cargo) select 0 select 1) + 3.01), (((boundingBox _cargo) select 0 select 2) + 1.19) + _zCoef ]] ; } ; if (typeOf _cargo in [ "Land_Pod_Heli_Transport_04_bench_F" ]) then { _cargo attachTo [_taru,[ (_slingPosX - 0.1), (((boundingBox _cargo) select 0 select 1) + 2.25), (((boundingBox _cargo) select 0 select 2) + 0.21) + _zCoef ]] ; } ; _taru setVariable [ "Taru_cargo" ,_cargo] ; |
1 | [taru,cargo] execVM "taruCargoAttach.sqf" |
1 | taru getVariable "Taru_cargo" ; |
自分がTaruのパイロットの場合、まず
- カーゴと自分の角度を5度以内に補正する(カーゴとヘリを直線に並ぶように)
- カーゴに近づく(この際カーゴと接触しないように注意、ときどきローターが壊れます)
- アクションメニューから"Attach Cargo"
でカチッとできます。
外すときは
- 速度を落とす
- 高度5m以下まで降下
- アクションメニューから"Detach Cargo"
で外せます。
改造自由でーす。
0 件のコメント :
コメントを投稿
注: コメントを投稿できるのは、このブログのメンバーだけです。