--****************************************************************************** --[[ @brief 270_BOMBER @author Yoshikazu KOIDE ]] --****************************************************************************** -- ▼依存ファイル dofile("game:\\common\\airesource\\script\\include\\include.lua"); dofile("game:\\common\\event\\include\\m270\\pointid.lua"); dofile("game:\\common\\event\\include\\m270\\entityid.lua"); -- ▼本ミッション用定数 CONST__TARGETTING_PARAM = -- ターゲット捕捉のパラメータ { LADER = -- レーダー { DISTANCE = 1000; -- レーダーの距離 ANGLE = 180; -- レーダーの角度(真正面を0度とした円錐の側面までの角度(度)) }; }; CONST__MAIN_ATK_PARAM = { ALT_DIFF = { MAX = 0; MIN = -250; }; DIST = { MAX = 100; MIN = 0; }; SHOOT = { WAIT_MIN = 0.0; WAIT_MAX = 0.0; RELOAD = 0.0; LOS_FLG = false; LOCK_FLG = false; }; }; -- ▼スクリプト初期化 function InitialSetup( context ) -- ▼移動 AddInitialLayer( context , "InitMove" , "Move" , 2 ); -- ▼メイン攻撃 AddInitialLayer( context , "InitAttack" , "Attack" , 2 ); -- ▼常駐オペレーション DefaultSetup( context , true ); SetAltitudeParam( context , GetInitialAltitude( context ) , 0 ); SetAdjustAltitudeBase( context , ADJUST_ALTITUDE_BASE__ABSOLUTE ); -- ▼ターゲット補足関数 Targetting_CatchUpWithConeInSide( context , CONST__TARGETTING_PARAM.LADER.DISTANCE , CONST__TARGETTING_PARAM.LADER.ANGLE ); end -- ▼初期化する。 RegistInitializeFuncitonName( "InitialSetup"); --///////////////////////////////////////////////////////////////////////////////////////////// --///////////////////////////////////////////////////////////////////////////////////////////// --///////////////////////////////////////////////////////////////////////////////////////////// --****************************************************************************** --[[ @brief 移動 ]] --****************************************************************************** function InitMove() end function Move( context ) -- ▼移動オペレーション if ( IsExistTarget( context ) ) then Op_KeepDist( context , OperationIdentifier( 1 ) , 4 , 6 , 1 , nil , 0 , 0 ); Op_PassThrough( context, OperationIdentifier( 2 ) , 10 , 14 , 1 , nil , 10 , 180 , 3); else Op_Nothing( context , OperationIdentifier( 10 ) , 4 , 6 , 1 , nil ); end end --****************************************************************************** --[[ @brief 攻撃 ]] --****************************************************************************** function InitAttack() -- end -- function Attack( context) if ( IsExistTarget( context ) ) then -- ▼ローカル変数 local dist = GetToTargetDistanceXZ( context ); local target_alt = GetToTargetAltitude( context ); if ( target_alt > 0 or dist > CONST__MAIN_ATK_PARAM.DIST.MAX or dist < CONST__MAIN_ATK_PARAM.DIST.MIN ) then Op_Nothing( context , OperationIdentifier( 11 ) , 1 , 2 , 1 , nil ); else Op_ShootRifle( context , OperationIdentifier( 12 ) , 2.0 , 3.0 , 1 , nil , WEAPON_ID__MAIN , CONST__MAIN_ATK_PARAM.SHOOT.WAIT_MIN , CONST__MAIN_ATK_PARAM.SHOOT.WAIT_MAX , CONST__MAIN_ATK_PARAM.SHOOT.RELOAD , CONST__MAIN_ATK_PARAM.SHOOT.LOS_FLG , CONST__MAIN_ATK_PARAM.SHOOT.LOCK_FLG ); end else Op_Nothing( context , OperationIdentifier( 90 ) , 4 , 6 , 1 , nil ); end end