--********************************************************************************* -- 雲海戦(大型輸送車両) --********************************************************************************* LoadEventStdScriptFile( CURR_DLLUA_INSTANCE ); LoadMissionConstValueAuto( "240" ); ----------------------------------------------------------------------------------- -- 定数 ----------------------------------------------------------------------------------- CONST__FLG__AP_DECREASE = 2; CONST__FLG__CLEAR = 3; ----------------------------------------------------------------------------------- -- 変数 ----------------------------------------------------------------------------------- g_bDamageFlg = CONST__FLG__CLEAR; ----------------------------------------------------------------------------------- -- 初期化 ----------------------------------------------------------------------------------- function Initial( eventOperation ) LogEvent( "■大型輸送車両:初期化開始" ); ON_DESTROY_ME( eventOperation , "OnDeadMe" ); -- 大型輸送車両死亡 ON_RECIEVE_USER_MESSAGE( eventOperation, m240_CONST__CODE_ID_OF_USERMSG__VEHICLE_CTRL , m240_CONST__MSG_ID_OF_USERMSG__START , m240_CONST__MSG_ID_OF_USERMSG__START , "OnStart"); -- ▼AP監視 ON_DECREASE_DURABILITY_MYSELF( eventOperation , m240_CONST__AP_RATE_OF_TRAIN , "OnDamageFlg" ); -- ★ミッション開始時 ON_BRIEFING_FINISH( eventOperation , "OnMissionStart" ); LogEvent( "■大型輸送車両:初期化終了" ); end ----------------------------------------------------------------------------------- -- ミッション開始 ----------------------------------------------------------------------------------- function OnMissionStart( eventOperation ) LogEvent( "■大型輸送車両:ミッション開始" ); ObserveRegionExistMySelf( eventOperation , m240_PT_ATTENTION_01 , "OnPtAttention1" ); ObserveRegionExistMySelf( eventOperation , m240_PT_ATTENTION_02 , "OnPtAttention2" ); end ----------------------------------------------------------------------------------- -- 大型輸送車両死亡 ----------------------------------------------------------------------------------- function OnDeadMe( eventOperation ) LogEvent( "■大型輸送車両:死亡" ); SendUserMessageToEntity( eventOperation , m240_ET_DUMMY_OBJ_1 , m240_CONST__CODE_ID_OF_USERMSG__DUMMY_POLY_CTRL , m240_CONST__MSG_ID_OF_USERMSG__DEAD ); SendUserMessageToEntity( eventOperation , m240_ET_DUMMY_OBJ_2 , m240_CONST__CODE_ID_OF_USERMSG__DUMMY_POLY_CTRL , m240_CONST__MSG_ID_OF_USERMSG__DEAD ); SendUserMessageToEntity( eventOperation , m240_ET_DUMMY_OBJ_3 , m240_CONST__CODE_ID_OF_USERMSG__DUMMY_POLY_CTRL , m240_CONST__MSG_ID_OF_USERMSG__DEAD ); SendUserMessageToEntity( eventOperation , m240_ET_DUMMY_OBJ_4 , m240_CONST__CODE_ID_OF_USERMSG__DUMMY_POLY_CTRL , m240_CONST__MSG_ID_OF_USERMSG__DEAD ); end ----------------------------------------------------------------------------------- -- 大型輸送車両移動開始時 ----------------------------------------------------------------------------------- function OnStart( eventOperation ) LogEvent( "■大型輸送車両:移動開始を受信" ); SendUserMessageToEntity( eventOperation , m240_ET_DUMMY_OBJ_1 , m240_CONST__CODE_ID_OF_USERMSG__DUMMY_POLY_CTRL , m240_CONST__MSG_ID_OF_USERMSG__START ); SendUserMessageToEntity( eventOperation , m240_ET_DUMMY_OBJ_2 , m240_CONST__CODE_ID_OF_USERMSG__DUMMY_POLY_CTRL , m240_CONST__MSG_ID_OF_USERMSG__START ); SendUserMessageToEntity( eventOperation , m240_ET_DUMMY_OBJ_3 , m240_CONST__CODE_ID_OF_USERMSG__DUMMY_POLY_CTRL , m240_CONST__MSG_ID_OF_USERMSG__START ); SendUserMessageToEntity( eventOperation , m240_ET_DUMMY_OBJ_4 , m240_CONST__CODE_ID_OF_USERMSG__DUMMY_POLY_CTRL , m240_CONST__MSG_ID_OF_USERMSG__START ); end ----------------------------------------------------------------------------------- -- 大型輸送車のAP一定値以下 ----------------------------------------------------------------------------------- function OnDamageFlg( eventOperation ) LogEvent( "■大型輸送車両:AP一定値以下" ); g_bDamageFlg = CONST__FLG__AP_DECREASE; end ----------------------------------------------------------------------------------- -- 大型輸送車両の特定領域侵入 ----------------------------------------------------------------------------------- function OnPtAttention1( eventOperation ) LogEvent( "■大型輸送車両:大型輸送車両の特定領域侵入1" ); if g_bDamageFlg == CONST__FLG__CLEAR then ShowTextMessage( eventOperation , 2400050 , 5 ); end end function OnPtAttention2( eventOperation ) LogEvent( "■大型輸送車両:大型輸送車両の特定領域侵入2" ); if g_bDamageFlg == CONST__FLG__CLEAR then ShowTextMessage( eventOperation , 2400150 , 5 ); end end