Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class M02_Objective_Controller : public ScriptImpClass
- {
- void Created(GameObject *obj);
- void Custom(GameObject *obj,int type,int param,GameObject *sender);
- void Timer_Expired(GameObject *obj, int number);
- void M02_Objective_Controller_Manage_HUD_Info(GameObject *obj, int type);
- int RocketDropInterval;
- int MinigunnerDropInterval;
- int Trigger09Sec;
- bool DroppedRockets;
- };
- void M02_Objective_Controller::Created(GameObject *obj)
- {
- Commands->Reveal_Encyclopedia_Character(37);
- Commands->Reveal_Encyclopedia_Character(4);
- Commands->Reveal_Encyclopedia_Character(10);
- Commands->Reveal_Encyclopedia_Character(8);
- Commands->Set_Background_Music("02-Packing Iron.mp3");
- GameObject *MCT = Find_Object(1111116);
- if (MCT)
- Commands->Set_Animation_Frame(MCT, "MCT_NOD.MCT_NOD", 0);
- RocketDropInterval = 0;
- MinigunnerDropInterval = 0;
- DroppedRockets = 0;
- Trigger09Sec = 3;
- Commands->Enable_Hibernation(obj, false);
- Commands->Set_HUD_Help_Text(7665, Vector3(0.196000,0.882000,0.196000));
- Commands->Add_Objective(201, 1, 0, 6222, 0, 6043);
- Commands->Set_Objective_HUD_Info_Position(201, 50, "POG_M08_1_04.tga", 7384);
- Commands->Add_Objective(223, 3, 3, 6201, 0, 6013);
- Commands->Add_Objective(222, 3, 3, 6202, 0, 6014);
- Commands->Start_Timer(obj, this, 2, 201);
- }
- void M02_Objective_Controller::Custom(GameObject *obj,int type,int param,GameObject *sender)
- {
- if(type > 199)
- {
- if(param == 0)
- {
- M02_Objective_Controller_Manage_HUD_Info(obj, type);
- Commands->Start_Timer(obj, this, 2, type);
- }
- else if(param == 1)
- {
- Commands->Set_HUD_Help_Text(7667, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Set_Objective_Status(type, 1);
- Commands->Start_Timer(obj, this, 2, type + 200);
- }
- else if(param == 2)
- Commands->Set_Objective_Status(type, 2);
- else if(param == 3)
- {
- Trigger09Sec--;
- if(!Trigger09Sec)
- {
- Commands->Set_HUD_Help_Text(7667, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Set_Objective_Status(213, 1);
- Commands->Stop_All_Conversations();
- int M02_SECONDARY_09_FINISH_ID = Commands->Create_Conversation("M02_SECONDARY_09_FINISH", 100, 300, true);
- Commands->Join_Conversation(0, M02_SECONDARY_09_FINISH_ID, 1, true, true);
- GameObject *UnknownObj = UnknownFunction();
- Vector3 Pos = Commands->Get_Position(UnkownObj?);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_SECONDARY_09_FINISH_ID, true, false, false);
- Commands->Start_Conversation(M02_SECONDARY_09_FINISH_ID, 0);
- }
- }
- else
- {
- if(type == 1000)
- {
- if(param == 1000)
- {
- RocketDropInterval++;
- if(RocketDropInterval > 1 )
- {
- RocketDropInterval = 0;
- GameObject *CinObject = Commands->Create_Object("Invisible_Object", Vector3(-0.418750, -0.178906, -0.112891));
- if(CinObject)
- {
- Commands->Set_Facing(CinObject, 70.5);
- Commands->Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop02_Rocket.txt");
- }
- if (!DroppedRockets)
- {
- DroppedRockets = true;
- Commands->Stop_All_Conversations();
- int M02_MORE_ROCKET_SOLDIERS_ID = Commands->Create_Conversation("M02_MORE_ROCKET_SOLDIERS", 100, 300, 1);
- Commands->Join_Conversation(0, M02_MORE_ROCKET_SOLDIERS, true, true, true);
- GameObject *UnknownObj = UnknownFunction();
- Vector3 Pos = Commands->Get_Position(UnkownObj?);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_MORE_ROCKET_SOLDIERS, true, false, false);
- Commands->Start_Conversation(M02_MORE_ROCKET_SOLDIERS_ID, 0);
- }
- }
- }
- else if(param == 1001)
- {
- MinigunnerDropInterval++;
- if(MinigunnerDropInterval > 2)
- {
- MinigunnerDropInterval = 0;
- GameObject *CinObject = Commands->Create_Object("Invisible_Object", Vector3(819.380005, 884.049988, 24.500000));
- if(CinObject)
- {
- Commands->Set_Facing(CinObject, 110);
- Commands->Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop03_Minigunner.txt");
- }
- }
- }
- else if(param == 1002)
- {
- v29 = Commands->Get_Position(Unknown);
- GameObject *Star = Commands->Get_A_Star(v29?);
- Commands->Give_Powerup(Star, "Level_01_Keycard", false);
- }
- }
- }
- }
- }
- void M02_Objective_Controller::Timer_Expired(GameObject *obj, int number)
- {
- Commands->Stop_All_Conversations();
- int ConversationID = 0;
- if(number > 403)
- {
- switch(number)
- {
- case 404:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_01_FINISH", 100, 300, true);
- break;
- case 406:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_02_FINISH", 100, 300, true);
- break;
- case 407:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_03_FINISH", 100, 300, true);
- break;
- case 408:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_04_FINISH", 100, 300, true);
- break;
- case 409:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_05_FINISH", 100, 300, true);
- break;
- case 410:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_06_FINISH", 100, 300, true);
- break;
- case 411:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_07_FINISH", 100, 300, true);
- Commands->Start_Timer(obj, this, 5, 11); // Makes no sense.. there is no trigger to do anything at number 11.
- break;
- case 412:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_08_FINISH", 100, 300, true);
- break;
- case 414:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_10_FINISH", 100, 300, true);
- break;
- case 416:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_12_FINISH", 100, 300, true);
- break;
- case 417:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_13_FINISH", 100, 300, true);
- break;
- default:
- return;
- }
- }
- else
- {
- if(number == 403)
- ConversationID = Commands->Create_Conversation("M02_PRIMARY_03_FINISH", 100, 300, true);
- else
- {
- //number -= 10; Probably not here, but the code that showed up indicated -= 10.
- if(number > 403)
- {
- switch(number)
- {
- case 10:
- ConversationID = Commands->Create_Conversation("M02_PRIMARY_04_REMIND", 100, 300, true);
- break;
- case 201:
- ConversationID = Commands->Create_Conversation("M02_PRIMARY_01_START", 100, 300, true);
- break;
- case 204:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_01_START", 100, 300, true);
- break;
- case 205:
- ConversationID = Commands->Create_Conversation("M02_PRIMARY_04_START", 100, 300, true);
- Commands->Start_Timer(obj, this, 120, 10);
- break;
- case 206:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_02_START", 100, 300, true);
- break;
- case 208:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_04_START", 100, 300, true);
- break;
- case 210:
- ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0004", 100, 300, true);
- break;
- case 211:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_07_START", 100, 300, true);
- break;
- case 212:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_08_START", 100, 300, true);
- break;
- case 214:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_10_START", 100, 300, true);
- break;
- case 218:
- ConversationID = Commands->Create_Conversation("M02_SECONDARY_14_START", 100, 300, true);
- break;
- default:
- return;
- }
- }
- }
- }
- if (ConversationID)
- {
- Commands->Join_Conversation(0, ConversationID, true, true, true);
- GameObject *UnknownObj = UnknownFunction();
- Vector3 Pos = Commands->Get_Position(UnknownObj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, ConversationID, true, false, false);
- Commands->Start_Conversation(ConversationID, 0);
- }
- }
- void M02_Objective_Controller::M02_Objective_Controller_Manage_HUD_Info(GameObject *obj, int type)
- {
- switch(type)
- {
- case 202:
- Commands->Set_HUD_Help_Text(7665, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6223, 0, 6044);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M07_2_05.tga", 7377);
- return;
- case 203:
- Commands->Set_HUD_Help_Text(7665, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 1, 0, 6224, 0, 6045);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_1_03.tga", 7376);
- return;
- case 204:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6275, 0, 6142);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_01.tga", 7376);
- return;
- case 205:
- Commands->Set_HUD_Help_Text(7665, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 1, 0, 6225, 0, 6046);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_1_04.tga", 7373);
- return;
- case 206:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6276, 0, 6143);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_02.tga", 7376);
- return;
- case 207:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 0, 6277, 0, 6144);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_03.tga", 7378);
- return;
- case 208:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6279, 0, 6146);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_06.tga", 7378);
- return;
- case 209:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6278, 0, 6145);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_05.tga", 7378);
- return;
- case 210:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6280, 0, 6147);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_04.tga", 7378);
- return;
- case 211:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6281, 0, 6148);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_07.tga", 7378);
- return;
- case 212:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6282, 0, 6149);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_08.tga", 7376);
- return;
- case 213:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6283, 0, 6150);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_09.tga", 7376);
- return;
- case 214:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6284, 0, 6151);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_10.tga", 7376);
- return;
- case 215:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6285, 0, 6152);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_11.tga", 7376);
- return;
- case 216:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6286, 0, 6153);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_12.tga", 7376);
- return;
- case 217:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6287, 0, 6154);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_13.tga", 7376);
- return;
- case 218:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6288, 0, 6155);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_14.tga", 7376);
- return;
- case 219:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6289, 0, 6156);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_14.tga", 7376);
- return;
- case 220:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6290, 0, 6157);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_14.tga", 7376);
- return;
- case 221:
- Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
- Commands->Add_Objective(type, 2, 0, 6291, 0, 6158);
- Commands->Set_Objective_Radar_Blip(type, Unkown);
- Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_15.tga", 7371);
- return;
- default:
- return;
- }
- }
- class M02_Objective_Zone : public ScriptImpClass
- {
- void Register_Auto_Save_Variables();
- void Created(GameObject *obj);
- void Entered(GameObject *obj,GameObject *enterer);
- void Timer_Expired(GameObject *obj,int number);
- void Custom(GameObject *obj,int type,int param,GameObject *sender);
- void unknown(int a1);
- int Unknown1; // Seriously this script is so badass big i was too lazy to identify these but Unknown2 is probably MendozaID
- int Unknown2;
- int Unknown3;
- int Unknown4;
- };
- void M02_Objective_Zone::Register_Auto_Save_Variables()
- {
- Auto_Save_Variable(&Unknown4, 1, 1);
- Auto_Save_Variable(&Unknown2, 4, 2);
- Auto_Save_Variable(&Unknown3, 1, 3);
- Auto_Save_Variable(&Unknown1, 1, 4);
- }
- void M02_Objective_Zone::Created(GameObject *obj)
- {
- Unknown1 = 0;
- Unknown2 = 0;
- Unknown3 = 0;
- Unknown4 = 0;
- }
- void M02_Objective_Zone::Entered(GameObject *obj,GameObject *enterer)
- {
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(!SearchObj)
- return;
- int ObjID = Commands->Get_ID(obj);
- int DestroyObjID = 0;
- if(ObjID > 400551)
- {
- if(ObjID > 401114)
- {
- if(ObjID > 401982)
- {
- switch(ObjID)
- {
- case 405118:
- Commands->Destroy_Object(obj);
- return;
- case 405116:
- Commands->Stop_All_Conversations();
- int M02_OBELISK_APPROACH = Commands->Create_Conversation("M02_OBELISK_APPROACH", 100, 300, true);
- Commands->Join_Conversation(0, M02_OBELISK_APPROACH, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_OBELISK_APPROACH, true, false, false);
- Commands->Start_Conversation(M02_OBELISK_APPROACH, 0);
- break;
- case 405117:
- Commands->Stop_All_Conversations();
- int M02_PRIMARY_02_REMIND = Commands->Create_Conversation("M02_PRIMARY_02_REMIND", 100, 300, true);
- Commands->Join_Conversation(0, M02_PRIMARY_02_REMIND, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_PRIMARY_02_REMIND, true, false, false);
- Commands->Start_Conversation(M02_PRIMARY_02_REMIND, 0);
- break;
- case 405119:
- Commands->Stop_All_Conversations();
- int M02_SECONDARY_03_START = Commands->Create_Conversation("M02_SECONDARY_03_START", 100, 300, 1);
- Commands->Join_Conversation(0, M02_SECONDARY_03_START, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_SECONDARY_03_START, true, false, false);
- Commands->Start_Conversation(M02_SECONDARY_03_START, 0);
- break;
- case 405120:
- GameObject *Mammy = Commands->Create_Object("GDI_Mammoth_Tank_Player", Vector3(570.059998, 261.470001, -0.080078));
- if(Mammy)
- {
- Commands->Set_Facing(Mammy, 45.000000);
- Commands->Attach_Script(Mammy, "M02_Player_Vehicle", "2");
- }
- break;
- case 405122:
- Commands->Stop_All_Conversations();
- int M02_SECONDARY_11_START = Commands->Create_Conversation("M02_SECONDARY_11_START", 100, 300, 1);
- Commands->Join_Conversation(0, M02_SECONDARY_11_START, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_SECONDARY_11_START, true, false, false);
- Commands->Start_Conversation(M02_SECONDARY_11_START, 0);
- break;
- default:
- return;
- }
- Commands->Destroy_Object(obj);
- return;
- }
- if(ObjID == 401982)
- {
- Commands->Stop_All_Conversations();
- int M02_SECONDARY_13_START = Commands->Create_Conversation("M02_SECONDARY_13_START", 100, 300, 1);
- Commands->Join_Conversation(0, M02_SECONDARY_13_START, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_SECONDARY_13_START, true, false, false);
- Commands->Start_Conversation(M02_SECONDARY_13_START, 0);
- GameObject *Jet = Commands->Create_Object("Nod_Jet", Vector3(929.909973, 1132.339966, 70.500000));
- if(Jet)
- Commands->Attach_Script(Jet, "M02_Nod_Jet", "");
- Commands->Destroy_Object(obj);
- return;
- }
- ObjID -= 401123;
- switch(ObjID)
- {
- case 0:
- GameObject *SearchObj1 = Commands->Find_Object(401124);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401125);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401126);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401127);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401128);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401129);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- Commands->Destroy_Object(obj);
- return;
- case 7:
- GameObject *SearchObj_02 = Commands->Find_Object(1157690);
- if(SearchObj_02)
- {
- if(Commands->Get_Health(SearchObj_02) != 0.0)
- {
- Commands->Stop_All_Conversations();
- int M02_SECONDARY_01_GUIDE = Commands->Create_Conversation("M02_SECONDARY_01_GUIDE", 100, 300, 1);
- Commands->Join_Conversation(0, M02_SECONDARY_01_GUIDE, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_SECONDARY_01_GUIDE, true, false, false);
- Commands->Start_Conversation(M02_SECONDARY_01_GUIDE, 0);
- }
- }
- GameObject *SearchObj1 = Commands->Find_Object(401132);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401133);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401134);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401135);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401136);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401137);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401138);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401139);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- DestroyObjID = 401131;
- break;
- case 8:
- GameObject *SearchObj_02 = Commands->Find_Object(1157690);
- if(SearchObj_02)
- {
- if(Commands->Get_Health(SearchObj_02) != 0.0)
- {
- Commands->Stop_All_Conversations();
- int M02_SECONDARY_01_GUIDE = Commands->Create_Conversation("M02_SECONDARY_01_GUIDE", 100, 300, 1);
- Commands->Join_Conversation(0, M02_SECONDARY_01_GUIDE, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_SECONDARY_01_GUIDE, true, false, false);
- Commands->Start_Conversation(M02_SECONDARY_01_GUIDE, 0);
- }
- }
- GameObject *SearchObj1 = Commands->Find_Object(401132);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401133);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401134);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401135);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401136);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401137);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401138);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401139);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- DestroyObjID = 401130;
- break;
- case 63:
- GameObject *SearchObj_02 = Commands->Find_Object(474463);
- if(SearchObj_02)
- {
- GameObject *Apache = Commands->Create_Object("Nod_Apache", Vector3(1300.897949, 657.716980, 67.363998));
- if(Apache)
- {
- Commands->Set_Facing(Apache, 0);
- Commands->Attach_Script(Apache, "M02_Nod_Apache", "15");
- }
- }
- Commands->Stop_All_Conversations();
- int M02_SECONDARY_14_GUIDE = Commands->Create_Conversation("M02_SECONDARY_14_GUIDE", 100, 300, 1);
- Commands->Join_Conversation(0, M02_SECONDARY_14_GUIDE, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_SECONDARY_14_GUIDE, true, false, false);
- Commands->Start_Conversation(M02_SECONDARY_14_GUIDE, 0);
- DestroyObjID = 401187;
- break;
- case 64:
- GameObject *SearchObj_02 = Commands->Find_Object(474463);
- if(SearchObj_02)
- {
- GameObject *Apache = Commands->Create_Object("Nod_Apache", Vector3(1300.897949, 657.716980, 67.363998));
- if(Apache)
- {
- Commands->Set_Facing(Apache, 0);
- Commands->Attach_Script(Apache, "M02_Nod_Apache", "15");
- }
- }
- Commands->Stop_All_Conversations();
- int M02_SECONDARY_14_GUIDE = Commands->Create_Conversation("M02_SECONDARY_14_GUIDE", 100, 300, 1);
- Commands->Join_Conversation(0, M02_SECONDARY_14_GUIDE, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_SECONDARY_14_GUIDE, true, false, false);
- Commands->Start_Conversation(M02_SECONDARY_14_GUIDE, 0);
- DestroyObjID = 401186;
- break;
- case 73:
- Commands->Send_Custom_Event(obj, SearchObj, 105, 11, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 14, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1061, Pos, 1000.000000);
- GameObject *SearchObj1 = Commands->Find_Object(401071);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401072);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401073);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401074);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401075);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401076);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401077);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401078);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401192);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- GameObject *SearchObj10 = Commands->Find_Object(401193);
- Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
- GameObject *SearchObj11 = Commands->Find_Object(401194);
- Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
- GameObject *SearchObj12 = Commands->Find_Object(401195);
- Commands->Send_Custom_Event(obj, SearchObj12, 0, 0, 0);
- DestroyObjID = 401070;
- break;
- default:
- return;
- }
- }
- else
- {
- if(ObjID == 401114)
- {
- GameObject *SearchObj1 = Commands->Find_Object(401115);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401116);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401117);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401118);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401119);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401120);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401121);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401122);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- DestroyObjID = 401113;
- }
- else
- {
- ObjID -= 400989;
- switch(ObjID)
- {
- case 0:
- Commands->Destroy_Object(obj);
- return;
- case 1:
- GameObject *CinObj = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
- Commands->Attach_Script(CinObj, "Test_Cinematic", "X2E_C130Drop.txt");
- Commands->Destroy_Object(obj);
- return;
- case 2:
- GameObject *CinObj = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
- Commands->Attach_Script(CinObj, "Test_Cinematic", "X2F_OrcaSam.txt");
- Commands->Destroy_Object(obj);
- return;
- case 3:
- GameObject *CinObj = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
- Commands->Attach_Script(CinObj, "Test_Cinematic", "X2G_AirCrash.txt");
- Commands->Destroy_Object(obj);
- return;
- case 12:
- GameObject *CinObj = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
- Commands->Attach_Script(CinObj, "Test_Cinematic", "X2H_ApacheSpray.txt");
- Commands->Destroy_Object(obj);
- return;
- case 40:
- GameObject *CinObj = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
- Commands->Attach_Script(CinObj, "Test_Cinematic", "X2D_MTank_Slip.txt");
- Commands->Destroy_Object(obj);
- return;
- case 65:
- Commands->Send_Custom_Event(obj, SearchObj, 114, 8, 0);
- LABEL_107:
- Commands->Send_Custom_Event(obj, SearchObj, 102, 8, 0);
- Commands->Destroy_Object(obj);
- return;
- case 77:
- GameObject *SearchObj1 = Commands->Find_Object(400200);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401067);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401068);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401069);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(1153845);
- Commands->Send_Custom_Event(obj, SearchObj5, 1, 0, 0);
- Commands->Destroy_Object(obj);
- return;
- case 81:
- Commands->Send_Custom_Event(obj, SearchObj, 105, 11, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 14, 0);
- Vector3 Pos = Commands->Get_Position(&v712, a3);
- Commands->Create_Logical_Sound(obj, 1061, v374, 1000.000000);
- GameObject *SearchObj1 = Commands->Find_Object(401071);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401072);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401073);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401074);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401075);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401076);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401077);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401078);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401192);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- GameObject *SearchObj10 = Commands->Find_Object(401193);
- Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
- GameObject *SearchObj11 = Commands->Find_Object(401194);
- Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
- GameObject *SearchObj12 = Commands->Find_Object(401195);
- Commands->Send_Custom_Event(obj, SearchObj12, 0, 0, 0);
- DestroyObjID = 401196;
- break;
- case 90:
- Commands->Send_Custom_Event(obj, SearchObj, 105, 14, 0);
- Commands->Send_Custom_Event(a3, v6, 104, 15, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1064, &Pos, 1000.000000);
- Send_Custom_Event(obj, SearchObj, 218, 0, 0);
- Send_Custom_Event(obj, SearchObj, 219, 0, 0);
- Send_Custom_Event(obj, SearchObj, 220, 0, 0);
- GameObject *SearchObj1 = Commands->Find_Object(401089);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401087);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401086);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401088);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401085);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401090);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401091);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401092);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401094);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- GameObject *SearchObj10 = Commands->Find_Object(401095);
- Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
- GameObject *SearchObj11 = Commands->Find_Object(401096);
- Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
- GameObject *SearchObj12 = Commands->Find_Object(401097);
- Commands->Send_Custom_Event(obj, SearchObj12, 0, 0, 0);
- GameObject *SearchObj13 = Commands->Find_Object(401189);
- Commands->Send_Custom_Event(obj, SearchObj13, 0, 0, 0);
- GameObject *SearchObj14 = Commands->Find_Object(401190);
- Commands->Send_Custom_Event(obj, SearchObj14, 0, 0, 0);
- GameObject *SearchObj15 = Commands->Find_Object(401191);
- Commands->Send_Custom_Event(obj, SearchObj15, 0, 0, 0);
- DestroyObjID = 401080;
- break;
- case 91:
- Commands->Send_Custom_Event(obj, SearchObj, 105, 14, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 15, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1064, Pos, 1000.000000);
- Commands->Send_Custom_Event(obj, SearchObj, 218, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 219, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 220, 0, 0);
- GameObject *SearchObj1 = Commands->Find_Object(401089);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401087);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401086);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401088);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401085);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401090);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401091);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401092);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401094);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- GameObject *SearchObj10 = Commands->Find_Object(401095);
- Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
- GameObject *SearchObj11 = Commands->Find_Object(401096);
- Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
- GameObject *SearchObj12 = Commands->Find_Object(401097);
- Commands->Send_Custom_Event(obj, SearchObj12, 0, 0, 0);
- GameObject *SearchObj13 = Commands->Find_Object(401189);
- Commands->Send_Custom_Event(obj, SearchObj13, 0, 0, 0);
- GameObject *SearchObj14 = Commands->Find_Object(401190);
- Commands->Send_Custom_Event(obj, SearchObj14, 0, 0, 0);
- GameObject *SearchObj15 = Commands->Find_Object(401191);
- Commands->Send_Custom_Event(obj, SearchObj15, 0, 0, 0);
- DestroyObjID = 401079;
- break;
- case 112:
- Commands->Send_Custom_Event(obj, SearchObj, 204, 0, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1065, Pos, 1000.000000);
- GameObject *SearchObj1 = Commands->Find_Object(401103);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401104);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401105);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401106);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401107);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401108);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401109);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401110);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401112);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- DestroyObjID = 401102;
- break;
- case 113:
- Commands->Send_Custom_Event(obj, SearchObj, 204, 0, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1065, Pos, 1000.000000);
- GameObject *SearchObj1 = Commands->Find_Object(401103);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401104);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401105);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401106);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401107);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401108);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401109);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401110);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401112);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- DestroyObjID = 401101;
- break;
- case 124:
- GameObject *SearchObj1 = Commands->Find_Object(401115);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401116);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401117);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401118);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401119);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401120);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401121);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401122);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- DestroyObjID = 401114;
- break;
- default:
- return;
- }
- }
- }
- GameObject *SearchObj_02 = Commands->Find_Object(DestroyObjID);
- if(SearchObj_02)
- Commands->Destroy_Object(SearchObj_02);
- Commands->Destroy_Object(obj);
- return;
- }
- if(ObjID == 400551)
- {
- GameObject *SearchObj_02 = Commands->Find_Object(474463);
- if(SearchObj_02)
- {
- if(Commands->Get_Building_Power(SearchObj_02) && Commands->Get_Health(SearchObj_02) > 0.0)
- {
- GameObject *Apache = Commands->Create_Object("Nod_Apache", Vector3(610.030029, 1036.349976, -0.260125));
- if(Apache)
- {
- Commands->Set_Facing(Apache, 0);
- Commands->Attach_Script(Apache, "M02_Nod_Apache", "24");
- }
- }
- }
- Commands->Destroy_Object(obj);
- return;
- }
- if(ObjID > 400197)
- {
- if(ObjID > 400271)
- {
- ObjID -= 400272;
- switch(ObjID)
- {
- case 0:
- Commands->Send_Custom_Event(obj, SearchObj, 105, 8, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 10, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1058, Pos, 1000.000000);
- GameObject *SearchObj1 = Commands->Find_Object(400213);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400984);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401054);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401055);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401056);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401057);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- Commands->Destroy_Object(obj);
- return;
- case 1:
- Commands->Send_Custom_Event(obj, SearchObj, 105, 10, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 11, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 114, 11, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 102, 11, 0);
- GameObject *SearchObj1 = Commands->Find_Object(400276);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400199);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401065);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401058);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401059);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401060);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401061);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401063);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401064);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- LABEL_77:
- Commands->Create_Logical_Sound(obj, 1060, Commands->Get_Position(obj), 1000.000000);
- Commands->Destroy_Object(obj);
- return;
- case 2:
- GameObject *SearchObj_02 = Commands->Find_Object(1153846);
- if(SearchObj_02)
- {
- bool DidSendCustoms = false;
- if(Commands->Get_Health(SearchObj_02) <= 0.0)
- {
- Commands->Send_Custom_Event(obj, SearchObj, 105, 11, 0);
- Commands->Create_Logical_Sound(obj, 1061, Commands->Get_Position(obj), 1000.000000);
- Commands->Send_Custom_Event(obj, SearchObj, 114, 10, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 102, 10, 0);
- DidSendCustoms = true;
- }
- Commands->Send_Custom_Event(obj, SearchObj_02, 1, 0, 0);
- if(DidSendCustoms)
- {
- Commands->Destroy_Object(obj);
- return;
- }
- }
- return;
- default:
- return;
- case 44:
- Commands->Send_Custom_Event(obj, SearchObj, 105, 0, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1050, Pos, 1000.000000);
- GameObject *SearchObj1 = Commands->Find_Object(400317);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400318);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400319);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- Commands->Destroy_Object(obj);
- return;
- case 229:
- GameObject *SearchObj1 = Commands->Find_Object(400503);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400504);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400505);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(400506);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(400507);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(400508);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(400509);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(400510);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 24, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 214, 0, 0);
- DestroyObjID = 400502;
- break;
- case 230:
- Commands->Send_Custom_Event(obj, SearchObj 104, 24, 0);
- GameObject *SearchObj1 = Commands->Find_Object(400503);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400504);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400505);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(400506);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(400507);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(400508);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(400509);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(400510);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 214, 0, 0);
- DestroyObjID = 400501;
- break;
- }
- GameObject *SearchObj_02 = Commands->Find_Object(DestroyObjID);
- if(SearchObj_02)
- Commands->Destroy_Object(SearchObj_02);
- Commands->Destroy_Object(obj);
- return;
- }
- if(ObjID == 400271)
- {
- Commands->Send_Custom_Event(obj, SearchObj, 105, 9, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 8, 0);
- GameObject *SearchObj1 = Commands->Find_Object(400275);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401046);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401047);
- Commands->Send_Custom_Event(obj, SearchObj3 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401048);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401049);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401050);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401051);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401052);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401053);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1059, Pos, 1000.000000);
- GameObject *SearchObj10 = Commands->Find_Object(303203);
- GameObject *SearchObj_02 = Commands->Find_Object(400270);
- if(SearchObj_02)
- Commands->Destroy_Object(SearchObj_02);
- Commands->Destroy_Object(obj);
- return;
- }
- ObjID -= 400198;
- switch(ObjID)
- {
- case 0:
- Unknown4 = 1;
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1000, Pos, 1000.000000);
- Commands->Start_Timer(obj, this, 1, 6);
- case 3:
- Unknown4 = 1;
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1000, Pos, 1000.000000);
- Commands->Start_Timer(obj, this, 1, 7);
- case 69:
- Commands->Send_Custom_Event(obj, SearchObj, 211, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 105, 3, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 4, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1053, Pos, 1000.000000);
- Commands->Create_Logical_Sound(obj, 1102, Pos, 1000.000000);
- GameObject *SearchObj1 = Commands->Find_Object(400210);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400451);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400452);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(400453);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(400499);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(400500);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401025);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401026);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401027);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- GameObject *SearchObj10 = Commands->Find_Object(401028);
- Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 112, 4, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 111, 4, 0);
- GameObject *Buggy = Commands->Create_Object("Nod_Buggy", Vector3(366.209015, 861.401001, 6.488000));
- if(Buggy)
- {
- Commands->Set_Facing(Buggy, -0.040039);
- Commands->Attach_Script(Buggy, "M02_Nod_Vehicle", "4");
- }
- GameObject *SearchObj_02 = Commands->Find_Object(401018);
- Commands->Send_Custom_Event(obj, SearchObj_02, 0, 0, 0);
- Commands->Start_Timer(obj, this, 0.100000, 10);
- GameObject *SearchObj_03 = Commands->Find_Object(400187);
- if(SearchObj_03)
- Commands->Destroy_Object(SearchObj_03);
- Commands->Destroy_Object(obj);
- return;
- case 70:
- Commands->Send_Custom_Event(obj, SearchObj, 105, 4, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1054, Pos, 1000.000000);
- GameObject *SearchObj1 = Commands->Find_Object(400552);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400553);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400560);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(400555);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(400558);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(400559);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(400557);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(400554);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(400556);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- Commands->Send_Custom_Event(obj, Commands->Get_A_Star(Commands->Get_Position(obj)), 2, 5, 0);
- Commands->Destroy_Object(obj);
- return;
- case 71:
- Commands->Send_Custom_Event(obj, SearchObj, 202, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 203, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 217, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 105, 6, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 9, 0);
- GameObject *SearchObj1 = Commands->Find_Object(400212);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400981);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400982);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(400983);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1056, Pos, 1000.000000);
- GameObject *CinObject = Commands->Create_Object("Invisible_Object", Vector3(869.320007, 912.315979, 30.150000));
- if(CinObject)
- {
- Commands->Set_Facing(CinObject, 110.000000);
- Commands->Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop03_Minigunner.txt");
- }
- Commands->Stop_All_Conversations();
- int M02_PRIMARY_01_GUIDE = Commands->Create_Conversation("M02_PRIMARY_01_GUIDE", 100, 300, true);
- Commands->Join_Conversation(0, M02_PRIMARY_01_GUIDE, true, true, true);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_PRIMARY_01_GUIDE, true, false, false);
- Commands->Start_Conversation(M02_PRIMARY_01_GUIDE, 0);
- Commands->Destroy_Object(obj);
- return
- case 72:
- Commands->Send_Custom_Event(obj, SearchObj, 105, 9, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 8, 0);
- GameObject *SearchObj1 = Commands->Find_Object(400275);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401046);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401047);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401048);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401049);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401050);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401051);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401052);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401053);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1059, Pos, 1000.000000);
- GameObject *SearchObj_02 = Commands->Find_Object(400271);
- if(SearchObj_02)
- Commands->Destroy_Object(SearchObj_02);
- Commands->Destroy_Object(obj);
- return;
- default:
- return;
- }
- }
- else
- {
- if(ObjID == 400197)
- {
- Unknown3 = 1;
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1000, Pos, 1000.000000);
- Commands->Start_Timer(obj, this, 1, 5);
- }
- else
- {
- if(ObjID <= 400188)
- {
- if(ObjID == 400188)
- {
- Commands->Send_Custom_Event(obj, SearchObj, 212, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 213, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 105, 2, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 3, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1052, Pos, 1000.000000);
- GameObject *Light = Commands->Create_Object("Nod_Light_Tank", Vector3(465.644989, 715.859985, -0.283281));
- if(Light)
- {
- Commands->Set_Facing(Light, -0.437500);
- Commands->Attach_Script(Light, "M02_Nod_Vehicle", "3");
- }
- GameObject *SearchObj1 = Commands->Find_Object(400410);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400209);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400411);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(400412);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(400413);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(400414);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(400415);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- Commands->Destroy_Object(obj);
- return;
- }
- if(ObjID <= 400184)
- {
- if(ObjID == 400184)
- {
- Commands->Send_Custom_Event(obj, SearchObj, 206, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 207, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 0, 0);
- GameObject *CinObject = Commands->Create_Object("Invisible_Object", Vector3(-0.418750, -0.178906, -0.112891));
- if(CinObject)
- {
- Commands->Set_Facing(CinObject, 70.500000);
- Commands->Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop02_Rocket.txt");
- }
- GameObject *Search_Obj_02 = Commands->Find_Object(474463);
- if(Search_Obj_02 && Commands->Get_Building_Power(Search_Obj_02) && Commands->Get_Health(Search_Obj_02) > 0.0)
- {
- GameObject *Apache = Commands->Create_Object("Nod_Apache", Vector3(138.360001, -0.798750, -0.368750));
- if(Apache)
- {
- Commands->Set_Facing(Apache, -0.054688);
- Commands->Attach_Script(Apache, "M02_Nod_Apache", "0");
- }
- }
- GameObject *SearchObj1 = Commands->Find_Object(400286);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400287);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400288);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(400292);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(400293);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(400285);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(400206);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401004);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401005);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- GameObject *SearchObj10 = Commands->Find_Object(401006);
- Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
- }
- else
- {
- if(ObjID == 301601)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(Commands->Has_Key(Star, 6, false)) // Something like this?
- return;
- Commands->Stop_All_Conversations();
- int M02_BAY_DOOR_WARNING = Commands->Create_Conversation("M02_BAY_DOOR_WARNING", 100, 300, true);
- Commands->Join_Conversation(0, M02_BAY_DOOR_WARNING, true, true, true);
- Commands->Join_Conversation(Star, M02_BAY_DOOR_WARNING, true, false, false);
- Commands->Start_Conversation(M02_BAY_DOOR_WARNING, 0);
- }
- else
- {
- if(ObjID != 303203)
- {
- if(ObjID == 304006)
- {
- if(!Unknown3)
- {
- Unknown3 = 1;
- int MX2DSGN_DSGN0001 = Commands->Create_Conversation("MX2DSGN_DSGN0001", 100, 300, true);
- Commands->Join_Conversation(0, MX2DSGN_DSGN0001, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, MX2DSGN_DSGN0001, true, false, false);
- Commands->Start_Conversation(MX2DSGN_DSGN0001, 0);
- Commands->Set_HUD_Help_Text(8287, Vector3(0.196000, 0.882000, 0.196000));
- }
- }
- return;
- }
- Commands->Stop_All_Conversations();
- int M02_PRIMARY_03_GUIDE = Commands->Create_Conversation("M02_PRIMARY_03_GUIDE", 100, 300, true);
- Commands->Join_Conversation(0, M02_PRIMARY_03_GUIDE, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_PRIMARY_03_GUIDE, true, false, false);
- Commands->Start_Conversation(M02_PRIMARY_03_GUIDE, 0);
- }
- }
- Commands->Destroy_Object(obj);
- return;
- }
- if(!(ObjID - 400185))
- {
- Commands->Send_Custom_Event(obj, SearchObj, 208, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 209, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 1, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 112, 1, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 111, 1, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1100, Pos, 1000.000000);
- Commands->Create_Logical_Sound(obj, 1073, Pos, 1000.000000);
- GameObject *SearchObj1 = Commands->Find_Object(400342);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400343);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400347);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(400332);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(400340);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(400348);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(400344);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(400345);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(400333);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- GameObject *SearchObj10 = Commands->Find_Object(400207);
- Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
- GameObject *SearchObj11 = Commands->Find_Object(400371);
- Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
- GameObject *SearchObj12 = Commands->Find_Object(401008);
- Commands->Send_Custom_Event(obj, SearchObj12, 0, 0, 0);
- Commands->Destroy_Object(obj);
- return;
- }
- if(!(ObjID - 400186))
- {
- Commands->Send_Custom_Event(obj, SearchObj, 210, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 221, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 105, 1, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 2, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1051, Pos, 1000.000000);
- GameObject *SearchObj1 = Commands->Find_Object(400372);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400373);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400374);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401167);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(400208);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401014);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401015);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401016);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401017);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- GameObject *Buggy = Commands->Create_Object("Nod_Buggy", Vector3(674.622009, 308.295990, -0.067043));
- if(Buggy)
- {
- Commands->Set_Facing(Buggy, -0.049805);
- Commands->Attach_Script(Buggy, "M02_Nod_Vehicle", "2");
- }
- GameObject *SearchObj_02 = Commands->Find_Object(474463);
- if(SearchObj_02 && Commands->Get_Building_Power(SearchObj_02) && Commands->Get_Health(SearchObj_02) > 0.0)
- {
- GameObject *Apache = Commands->Create_Object("Nod_Apache", Vector3(509.362000, 473.582001, -0.109375));
- if(Apache)
- {
- Commands->Set_Facing(Apache, 0);
- Commands->Attach_Script(Apache, "M02_Nod_Sakura", "2");
- }
- }
- Commands->Destroy_Object(obj);
- return;
- }
- if(!(ObjID - 400187))
- {
- Commands->Send_Custom_Event(obj, SearchObj, 211, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 105, 3, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 4, 0);
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Create_Logical_Sound(obj, 1102, Pos, 1000.000000);
- Commands->Create_Logical_Sound(obj, 1053, Pos, 1000.000000);
- GameObject *SearchObj1 = Commands->Find_Object(400210);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400451);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400452);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(400453);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(400499);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(400500);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401025);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401026);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401027);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- GameObject *SearchObj10 = Commands->Find_Object(401028);
- Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 112, 4, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 111, 4, 0);
- GameObject *Buggy = Commands->Create_Object("Nod_Buggy", Vector3(366.209015, 861.401001, 6.488000));
- if(Buggy)
- {
- Commands->Set_Facing(Buggy, -0.040039);
- Commands->Attach_Script(Buggy, "M02_Nod_Vehicle", "4");
- }
- GameObject *SearchObj_02 = Commands->Find_Object(401018);
- Commands->Send_Custom_Event(obj, SearchObj_02, 0, 0, 0);
- Commands->Start_Timer(obj, this, 0.100000, 10);
- GameObject *SearchObj_03 = Commands->Find_Object(400267);
- if(SearchObj_03)
- Commands->Destroy_Object(SearchObj_03);
- Commands->Destroy_Object(obj);
- return;
- }
- }
- switch(ObjID)
- {
- case 400189:
- Commands->Send_Custom_Event(obj, SearchObj, 215, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 216, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 6, 0);
- GameObject *SearchObj1 = Commands->Find_Object(400211);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(400976);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(400975);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(400977);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(400978);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(400979);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(400980);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *SearchObj8 = Commands->Find_Object(401036);
- Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
- GameObject *SearchObj9 = Commands->Find_Object(401037);
- Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
- GameObject *SearchObj10 = Commands->Find_Object(401038);
- Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
- GameObject *SearchObj11 = Commands->Find_Object(401045);
- Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
- Commands->Destroy_Object(obj);
- return;
- case 400192:
- Commands->Send_Custom_Event(obj, SearchObj, 105, 11, 0);
- Commands->Create_Logical_Sound(obj, 1061, Commands->Get_Position(obj), 1000.000000);
- Commands->Destroy_Object(obj);
- return;
- case 400193:
- GameObject *CinObject = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
- if(CinObject)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Control_Enable(Star, false);
- Commands->Start_Timer(obj, this, 1, 9);
- Commands->Send_Custom_Event(obj, SearchObj, 1000, 1002, 25.000000);
- Commands->Attach_Script(CinObject, "Test_Cinematic", "X2K_Midtro.txt");
- }
- return;
- case 400194:
- if(!Unknown3)
- {
- Unknown3 = 1;
- Commands->Send_Custom_Event(obj, SearchObj, 205, 1, 0);
- Commands->Mission_Complete(true);
- Commands->Send_Custom_Event(obj, SearchObj, 105, 21, 0);
- }
- return;
- case 400195:
- Unknown4 = 1;
- Commands->Create_Logical_Sound(obj, 1000, Commands->Get_Position(obj), 1000.000000);
- Commands->Start_Timer(obj, this, 1, 3);
- break;
- case 400196:
- Unknown4 = 1;
- Commands->Create_Logical_Sound(obj, 1000, Commands->Get_Position(obj), 1000.000000);
- Commands->Start_Timer(obj, this, 1, 4);
- break;
- default:
- return;
- }
- }
- }
- return;
- }
- void M02_Objective_Zone::Timer_Expired(GameObject *obj,int number)
- {
- if(number == 3)
- {
- if(Unknown4)
- {
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- {
- Commands->Send_Custom_Event(obj, SearchObj, 207, 1, 0);
- Unknown4 = 0;
- Commands->Send_Custom_Event(obj, SearchObj, 111, 0, 0);
- Commands->Create_Logical_Sound(obj, 1100, Commands->Get_Position(obj), 1000.000000);
- Commands->Destroy_Object(obj);
- }
- return;
- }
- if(!Unknown1)
- {
- Unknown1 = 1;
- Commands->Stop_All_Conversations();
- int M02_EVAG_SECURE_WARNING = Commands->Create_Conversation("M02_EVAG_SECURE_WARNING", 100, 300, true);
- Commands->Join_Conversation(0, M02_EVAG_SECURE_WARNING, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_EVAG_SECURE_WARNING, true, false, false);
- Commands->Start_Conversation(M02_EVAG_SECURE_WARNING, 0);
- return;
- }
- }
- if(number >= 4 && number <= 7)
- {
- if(!Unknown4)
- {
- if(!Unknown1)
- {
- Unknown1 = 1;
- Commands->Stop_All_Conversations();
- int M02_EVAG_SECURE_WARNING = Commands->Create_Conversation("M02_EVAG_SECURE_WARNING", 100, 300, true);
- Commands->Join_Conversation(0, M02_EVAG_SECURE_WARNING, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_EVAG_SECURE_WARNING, true, false, false);
- Commands->Start_Conversation(M02_EVAG_SECURE_WARNING, 0);
- }
- }
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- {
- Commands->Send_Custom_Event(obj, SearchObj, 208 + number - 4, 1, 0);
- Commands->Destroy_Object(obj);
- return;
- }
- }
- if(number == 9)
- {
- GameObject *Jet = Commands->Create_Object("Nod_Jet", Vector3(1190.267944, 558.538025, 32.500000));
- if(Jet)
- Commands->Attach_Script(Jet, "M02_Nod_Jet_Waypath", "");
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Control_Enable(Star, true);
- ActionParamsStruct Params;
- Params.Set_Basic(this, 100, 0);
- // I have no idea what should be done here.
- Commands->Action_Follow_Input(Star, Params);
- Commands->Send_Custom_Event(obj, SearchObj, 201, 1, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 205, 0, 0);
- Commands->Send_Custom_Event(obj, SearchObj, 104, 21, 0);
- GameObject *SearchObj1 = Commands->Find_Object(400277);
- Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
- GameObject *SearchObj2 = Commands->Find_Object(401141);
- Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
- GameObject *SearchObj3 = Commands->Find_Object(401142);
- Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
- GameObject *SearchObj4 = Commands->Find_Object(401143);
- Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
- GameObject *SearchObj5 = Commands->Find_Object(401144);
- Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
- GameObject *SearchObj6 = Commands->Find_Object(401145);
- Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
- GameObject *SearchObj7 = Commands->Find_Object(401146);
- Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
- GameObject *Mendoza = Commands->Create_Object("Nod_FlameThrower_3Boss", Vector3(1260.006958, 535.460022, 18.427999));
- if(Mendoza)
- {
- Commands->Attach_Script(Mendoza, "M02_Mendoza", "");
- Unknown2 = Commands->Get_ID(Mendoza);
- GameObject *SearchObj_02 = Commands->Find_Object(400194);
- if(SearchObj_02)
- Commands->Send_Custom_Event(obj, SearchObj_02, 999, Unknown2, 0);
- }
- Commands->Destroy_Object(obj);
- }
- }
- if(number == 10)
- {
- GameObject *SearchObj = Commands->Find_Object(401028);
- if(SearchObj)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Vector3 StarPos = Commands->Get_Position(Star);
- if(Commands->Get_Distance(Pos, StarPos) >= 20.0)
- Commands->Start_Timer(obj, this, 2, 10);
- else
- {
- int MX2DSGN_DSGN0009 = Commands->Create_Conversation("MX2DSGN_DSGN0009", 100, 300, true);
- Commands->Join_Conversation(0, MX2DSGN_DSGN0009, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, MX2DSGN_DSGN0009, true, false, false);
- Commands->Start_Conversation(MX2DSGN_DSGN0009, 0);
- }
- }
- }
- if(number == 11)
- {
- GameObject *SearchObj = Commands->Find_Object(401028);
- if(SearchObj)
- {
- int MX2DSGN_DSGN0010 = Commands->Create_Conversation("MX2DSGN_DSGN0010", 100, 300, true);
- Commands->Join_Conversation(0, MX2DSGN_DSGN0010, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, MX2DSGN_DSGN0010, true, false, false);
- Commands->Start_Conversation(MX2DSGN_DSGN0010, 0);
- }
- }
- if(number == 12 && Commands->Find_Object(401036))
- {
- int MX2DSGN_DSGN0011 = Commands->Create_Conversation("MX2DSGN_DSGN0011", 100, 300, true);
- Commands->Join_Conversation(0, MX2DSGN_DSGN0011, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, MX2DSGN_DSGN0011, true, false, false);
- Commands->Start_Conversation(MX2DSGN_DSGN0011, 0);
- }
- }
- void M02_Objective_Zone::Custom(GameObject *obj,int type,int param,GameObject *sender)
- {
- if(type == 100 && param == 1)
- Unknown4 = 0;
- if(type == 999)
- {
- if(param == 999)
- {
- GameObject *Mendoza = Commands->Find_Object(Unknown2);
- if(Mendoza)
- {
- Unknown2 = 0;
- Commands->Destroy_Object(Mendoza);
- }
- }
- else
- Unknown2 = a4;
- }
- }
- void M02_Objective_Zone::unknown(int a1)
- {
- // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
- Vector3 Pos = Vector3(0,0,0);
- float Facing = 0;
- if(a1 == 2)
- {
- Pos = Vector3(664.700012, 312.570007, -0.070996);
- Facing = -0.028564;
- }
- else if(a1 == 9)
- {
- Pos = Vector3(869.320007, 912.315979, 30.150000);
- Facing = 110.000000;
- }
- else
- {
- Pos = Vector3(-0.418750, -0.178906, -0.112891);
- Facing = 70.500000;
- }
- GameObject *CinObject = Create_Object("Invisible_Object", Pos);
- if(CinObject)
- {
- Commands->Set_Facing(CinObject, Facing);
- Commands->Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop02_Rocket.txt");
- }
- }
- class M02_Reset_Spawn : public ScriptImpClass
- {
- void Created(GameObject *obj);
- };
- void M02_Reset_Spawn::Created(GameObject *obj)
- {
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- {
- int Area_ID = Get_Int_Parameter("Area_ID");
- int Spawn_Type = Get_Int_Parameter("Spawn_Type");
- Commands->Send_Custom_Event(obj, SearchObj, Spawn_Type, Area_ID, 0);
- }
- }
- class M02_Nod_Soldier : public ScriptImpClass
- {
- void Register_Auto_Save_Variables();
- void Created(GameObject *obj);
- void Timer_Expired(GameObject *obj, int number);
- void Custom(GameObject *obj,int type,int param,GameObject *sender);
- void Damaged(GameObject *obj,GameObject *damager,float amount);
- int UnknownVar;
- int AnimSwitcher;
- bool StarAttackingStarted;
- bool AttackStar;
- bool FallingDmgTriggered;
- float MaxHealth;
- };
- void M02_Nod_Soldier::Register_Auto_Save_Variables()
- {
- Auto_Save_Variable(&UnknownVar, 12, 1);
- Auto_Save_Variable(&StarAttackingStarted, 1, 2);
- Auto_Save_Variable(&AnimSwitcher, 4, 3);
- Auto_Save_Variable(&FallingDmgTriggered 1, 4);
- Auto_Save_Variable(&MaxHealth, 4, 5);
- Auto_Save_Variable(&AttackStar, 1, 6);
- }
- void M02_Nod_Soldier::Created(GameObject *obj)
- {
- AnimSwitcher = 0;
- StarAttackingStarted = false;
- AttackStar = false;
- FallingDmgTriggered = false;
- MaxHealth = 0;
- Vector3 Pos = Commands->Get_Position(obj);
- Commands->Set_Innate_Soldier_Home_Location(obj, Pos, 20);
- Commands->Enable_Hibernation(obj, false);
- Commands->Start_Timer(obj, this, 1, 1);
- int Pre_Placed = Get_Int_Parameter("Pre_Placed");
- if(Pre_Placed)
- Commands->Innate_Disable(obj);
- else
- {
- Commands->Grant_Key(obj, 1, true);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(Star)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 71, 0);
- Params.Set_Movement(Star, 0.800000, 5.000000);
- // The following numbers are used but idk where they belong:
- // 4 times 1.
- // 1101004800 OR 20.0000000
- // 1073741824 OR 2.000000
- // And a bunch of zeros
- Commands->Action_Goto(obj, Params);
- }
- }
- }
- void M02_Nod_Soldier::Timer_Expired(GameObject *obj, int number)
- {
- if(number == 1)
- {
- int Area_Officer = Get_Int_Parameter("Area_Officer");
- int Pre_Placed = Get_Int_Parameter("Pre_Placed");
- int Area_Number = Get_Int_Parameter("Area_Number");
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- {
- Commands->Send_Custom_Event(obj, SearchObj, 103, Area_Number, 0);
- if(Area_Officer)
- {
- Commands->Set_Innate_Take_Cover_Probability(obj, 100);
- Commands->Send_Custom_Event(obj, SearchObj, 106, Area_Number, 0);
- Commands->Enable_Hibernation(obj, true);
- }
- else
- {
- if(!Pre_Placed)
- Commands->Start_Timer(obj, this, 15, 2);
- else if(Pre_Placed == 4)
- {
- Commands->Attach_Script(obj, "M00_Soldier_Powerup_Disable", "");
- if ( !Area_Number || Area_Number == 3 || Area_Number == 6 || Area_Number == 10 || Area_Number == 16 || Area_Number == 21 )
- {
- StarAttackingStarted = true;
- Commands->Start_Timer(obj, this, 15, 4);
- }
- }
- else f(Pre_Placed == 2)
- {
- if(Area_Number == 99)
- Commands->Start_Timer(obj, this, 5, 6);
- }
- }
- }
- }
- else if(number == 2)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(Star)
- {
- ActionParamsStruct Params;
- Vector3 StarPos = Commands->Get_Position(Star);
- if(Commands->Get_Distance(Pos, StarPos) <= 70)
- {
- GameObject *Star2 = Commands->Get_A_Star(Pos);
- if(Commands->Is_Performing_Pathfind_Action(obj) || !Star2)
- {
- Commands->Start_Timer(obj, this, 5, 2);
- return;
- }
- Params.Set_Basic(this, 90, 0);
- Params.Set_Movement(Star2, 0.800000, 10.000000);
- Params.Set_Attack(Star2, 150.000000, 0, true);
- }
- else
- {
- if(!Commands->Is_Object_Visible(Star, obj))
- {
- Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
- Commands->Start_Timer(obj, this, 5, 2);
- return;
- }
- GameObject *Star2 = Commands->Get_A_Star(Pos);
- if(Commands->Is_Performing_Pathfind_Action(obj) || !Star2)
- {
- Commands->Start_Timer(obj, this, 5, 2);
- return;
- }
- Params.Set_Basic(this, 90, 0);
- Params.Set_Movement(Star2, 0.800000, 10.0000000);
- Params.Set_Attack(Star2, 150.000000, 0, true);
- }
- Commands->Action_Attack(obj, Params);
- }
- }
- else if(number == 3)
- {
- if(!Commands->Is_Performing_Pathfind_Action(obj))
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(Star)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 90, 0);
- Params.Set_Movement(Star, 0.800000, 10.0000000);
- Params.Set_Attack(Star, 150.000000, 0, true);
- Commands->Action_Attack(obj, Params);
- }
- }
- }
- else if(number == 4)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(Star)
- {
- Vector3 StarPos = Commands->Get_Position(Star);
- if(Commands->Get_Distance(Pos, StarPos) < 150.0)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 90, 0);
- Params.Set_Attack(Star, 150.00000, 0, true);
- // The following numbers are used but idk where they belong:
- // 4 times 1.
- // 1065353216; OR 1
- // 1073741824 OR 2
- // 2 times 0.0
- // And a bunch of zeros
- Commands->Action_Attack(obj, Params);
- }
- }
- Commands->Start_Timer(obj, this, 15, 4);
- }
- else if(number == 5)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Vector3 StarPos = Commands->Get_Position(Star);
- if(Commands->Get_Distance(StarPos, Pos) > 10.0 && !Commands->Is_Performing_Pathfind_Action(obj))
- {
- AnimSwitcher++;
- if(AnimSwitcher > 2)
- AnimSwitcher = 0;
- if(AnimSwitcher == 1)
- {
- if(Commands->Get_A_Star(Pos))
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 99, 0);
- Params.Set_Animation("H_A_J23C", false);
- // The following numbers are used but idk where they belong:
- // 5 times 1.
- // 1065353216 OR 1
- // 1101004800 OR 20
- // 1082130432 OR 4
- // 1 time 0.0
- // And a bunch of zeros
- Commands->Action_Play_Animation(obj, Params);
- Commands->Start_Timer(obj, this, 10, 5);
- return;
- }
- }
- else
- {
- if (Commands->Get_A_Star(Pos))
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 99, 0);
- Params.Set_Animation("H_A_J27C", false);
- // The following numbers are used but idk where they belong:
- // 5 times 1.
- // 1065353216 OR 1
- // 1101004800 OR 20
- // 1082130432 OR 4
- // 1 time 0.0
- // And a bunch of zeros
- Commands->Action_Play_Animation(obj, Params);
- Commands->Start_Timer(obj, this, 10, 5);
- return;
- }
- }
- }
- else
- {
- GameObject *Soldier = Commands->Find_Closest_Soldier(Pos, 1.000000, 50.000000, true);
- if(Soldier)
- {
- if(Soldier != Commands->Get_A_Star(Pos))
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 99, 0 );
- Params.Set_Animation("H_A_J27C", false);
- // The following numbers are used but idk where they belong:
- // 6 times 1.
- // 1065353216 OR 1
- // 1101004800 OR 20
- // 1082130432 OR 4
- // 1 time 0.0
- // And a bunch of zeros
- Commands->Action_Play_Animation(obj, Params);
- }
- }
- }
- Commands->Start_Timer(obj, this, 10, 5)
- }
- else if(number == 6)
- Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
- else if(number == 7)
- {
- if(AttackStar)
- {
- if(!Commands->Is_Performing_Pathfind_Action(obj))
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(Star)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 90, 0);
- Params.Set_Attack(Star, 150.000000, 0, true);
- // The following numbers are used but idk where they belong:
- // 1061997773; OR 0.800000
- // 1092616192 OR 10.000000
- // some zeros
- Commands->Action_Attack(obj, Params);
- }
- }
- }
- else
- {
- float Random = Commands->Get_Random(0, 1.999900); // v50
- if(Random > 1)
- Random = 1; // Didnt know what to make out of this.. doesn't make much sense...
- Random *= 5;
- Vector3 MovePos = Vector3(0,0,0);
- if(Random)
- {
- Random--;
- if(Random)
- {
- if(Number == 1) // Not possible..
- MovePos = Vector3(1310.67, 694.739990, 19.709999);
- else
- MovePos = Vector3(1242.26, 646.039978, 19.650000);
- }
- else
- MovePos = Vector3(1340.65, 655.039978, 19.510000);
- }
- else // This will never be executed aswell.. but there might have gone something wrong up here.
- MovePos = Vector3(1301.55, 617.890015, 19.660000);
- ActionParamsStruct Params;
- Params.Set_Basic(this, 31, 0);
- Params.Set_Movement(MovePos, 0.300000, 10.000000);
- // The following numbers are used but idk where they belong:
- // 5 times 1.
- // 1101004800 OR 20.0000000
- // 1073741824 OR 2.000000
- // And a bunch of zeros
- Commands->Action_Goto(obj, Params);
- }
- Commands->Start_Timer(obj, this, 30, 7);
- }
- else if(number == 10)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Vector3 StarPos = Commands->Get_Position(Star);
- if(Commands->Get_Distance(Pos, Star) < 20.0)
- {
- int MX2DSGN_DSGN0014 = Commands->Create_Conversation("MX2DSGN_DSGN0014", 100, 300, true);
- Commands->Join_Conversation(0, MX2DSGN_DSGN0014, true, true, true);
- Commands->Join_Conversation(obj, MX2DSGN_DSGN0014, true, false, false);
- Commands->Start_Conversation(MX2DSGN_DSGN0014, 0);
- Commands->Start_Timer(obj, this, 3, 11);
- return;
- }
- Commands->Start_Timer(obj, this, 2, 10);
- }
- else if(number == 11)
- {
- int MX2DSGN_DSGN0015 = Commands->Create_Conversation("MX2DSGN_DSGN0015", 100, 300, true);
- Commands->Join_Conversation(0, MX2DSGN_DSGN0015, true, true, true);
- Commands->Join_Conversation(obj, MX2DSGN_DSGN0015, true, false, false);
- Commands->Start_Conversation(MX2DSGN_DSGN0015, 0);
- }
- }
- void M02_Nod_Soldier::Custom(GameObject *obj,int type,int param,GameObject *sender)
- {
- v6 = a1;
- if ( Commands->Get_ID(obj) == 400276 )
- Commands->Start_Timer(obj, this, 2, 10);
- if(type)
- {
- if(type == 99 && !Commands->Is_Performing_Pathfind_Action(obj))
- {
- switch(param)
- {
- case 214:
- ActionParamsStruct Params;
- Params.Set_Basic(this, 71, 214);
- Vector3 SenderPos = Commands->Get_Position(sender);
- SenderPos.Z -= 1;
- Params.Set_Movement(sender, 0.800000, 10.000000);
- Params.Set_Attack(SenderPos, 10.000000, 0, true);
- // The following numbers are used but idk where they belong:
- // 5 times 1.
- // 1101004800 OR 20.0000000
- // 1073741824 OR 2.000000
- // 1 time 0.0
- // And a bunch of zeros
- Commands->Action_Attack(obj, Params);
- break;
- case 202:
- ActionParamsStruct Params;
- Params.Set_Basic(this, 50, 214);
- Params.Set_Attack(Vector3(1113.609985, 877.400024, 17.15), 10.000000, 0, false);
- // The following numbers are used but idk where they belong:
- // 5 times 1.
- // 1101004800 OR 20.0000000
- // 1073741824 OR 2.000000
- // 1146837402 OR 877.400024
- // 1099510579 OR 17.150000
- // 1061997773 OR 0.800000
- // 1 time 0.0
- // And a bunch of zeros
- Commands->Action_Attack(obj, Params);
- break;
- case 217:
- ActionParamsStruct Params;
- Params.Set_Basic(this, 50.0, 214);
- Params.Set_Movement(Vector3(1062.239990, 978.380005, -16.85), 0.800000, 10.000000);
- Params.Set_Attack(Vector3(1062.239990, 978.380005, -16.85), 10.000000, 0, false);
- Commands->Action_Attack(obj, Params);
- break;
- }
- }
- }
- else
- {
- if(!param)
- {
- Commands->Innate_Enable(obj);
- int Pre_Placed = Get_Int_Parameter("Pre_Placed"); // v7
- switch(Pre_Placed)
- {
- case 2:
- Commands->Start_Timer(obj, this, 1, 3);
- break;
- case 1:
- Commands->Start_Timer(obj, this, 10, 5);
- break;
- case 6:
- Commands->Start_Timer(obj, this, 1, 7);
- break;
- default:
- if(Pre_Placed == 5 && Get_Int_Parameter("Area_Number") == 19)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 31, 100);
- Params.Set_Animation("H_A_CON2", true);
- // The following numbers are used but idk where they belong:
- // 5 times 1.
- // 1065353216 OR 1.000000
- // 1101004800 OR 20.000000
- // 1073741824 OR 2.000000
- // 1 time 0.0
- // And a bunch of zeros
- Commands->Action_Play_Animation(a3, &v17);
- }
- break;
- }
- }
- }
- if (!FallingDmgTriggered)
- {
- if(type == CUSTOM_EVENT_FALLING_DAMAGE)
- MaxHealth = Commands->Get_Max_Health(obj);
- }
- }
- void M02_Nod_Soldier::Damaged(GameObject *obj,GameObject *damager,float amount)
- {
- if(!FallingDmgTriggered)
- {
- if (!damager)
- {
- FallingDmgTriggered = true;
- Commands->Set_Health(obj, MaxHealth);
- }
- }
- }
- class M02_Obelisk : public ScriptImpClass
- {
- void Damaged(GameObject *obj,GameObject *damager,float amount);
- void Killed(GameObject *obj,GameObject *killer);
- void Custom(GameObject *obj,int type,int param,GameObject *sender);
- bool DidAnouncement;
- };
- void M02_Obelisk::Damaged(GameObject *obj,GameObject *damager,float amount)
- {
- if(Commands->Get_Building_Power(obj))
- {
- GameObject *SearchObj = Commands->Find_Object(400200);
- if (SearchObj)
- {
- Commands->Send_Custom_Event(obj, SearchObj, 99, 202, 0);
- float MaxHealth = Commands->Get_Max_Health(obj);
- Commands->Set_Health(obj, MaxHealth);
- if(!DidAnouncement)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(damager == Star)
- {
- DidAnouncement = true;
- Commands->Stop_All_Conversations();
- int M02_EVA_OBELISK_REPAIR = Commands->Create_Conversation("M02_EVA_OBELISK_REPAIR", 100, 300, true);
- Commands->Join_Conversation(0, M02_EVA_OBELISK_REPAIR, true, true, true);
- Commands->Join_Conversation(Star, M02_EVA_OBELISK_REPAIR, true, false, false);
- Commands->Start_Conversation(M02_EVA_OBELISK_REPAIR, 0);
- }
- }
- }
- }
- }
- void M02_Obelisk::Killed(GameObject *obj,GameObject *killer)
- {
- if(Commands->Get_Building_Power(obj))
- {
- GameObject *SearchObj1 = Commands->Find_Object(1111112);
- if (SearchObj1)
- Commands->Send_Custom_Event(obj, SearchObj1, 202, 1, 0);
- }
- GameObject *SearchObj2 = Commands->Find_Object(405116);
- if(SearchObj2)
- Commands->Destroy_Object(SearchObj2);
- GameObject *SearchObj3 = Commands->Find_Object(405117);
- if(SearchObj3)
- Commands->Destroy_Object(SearchObj3);
- }
- void M02_Obelisk::Custom(GameObject *obj,int type,int param,GameObject *sender)
- {
- if(type == 1)
- DidAnouncement = true;
- }
- class M02_Power_Plant : public ScriptImpClass
- {
- void Damaged(GameObject *obj,GameObject *damager,float amount);
- void Killed(GameObject *obj,GameObject *killer);
- bool DidAnouncement;
- };
- void M02_Power_Plant::Damaged(GameObject *obj,GameObject *damager,float amount)
- {
- GameObject *SearchObj = Commands->Find_Object(400199);
- if(SearchObj)
- {
- Commands->Send_Custom_Event(obj, SearchObj, 99, 217, 0);
- float MaxHealth = Commands->Get_Max_Health(obj);
- Commands->Set_Health(obj, MaxHealth);
- if(!DidAnouncement)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(damager == Star)
- {
- DidAnouncement = true;
- Commands->Stop_All_Conversations();
- int M02_EVA_POWER_REPAIR = Commands->Create_Conversation("M02_EVA_POWER_REPAIR", 100, 300, true);
- Commands->Join_Conversation(0, M02_EVA_POWER_REPAIR, true, true, true);
- Commands->Join_Conversation(Star, M02_EVA_POWER_REPAIR, true, false, false);
- Commands->Start_Conversation(M02_EVA_POWER_REPAIR, 0);
- }
- }
- }
- }
- void M02_Power_Plant::Killed(GameObject *obj,GameObject *killer)
- {
- GameObject *SearchObj1 = Commands->Find_Object(1111112);
- if(SearchObj1)
- {
- Commands->Send_Custom_Event(obj, SearchObj1, 217, 1, 0);
- Commands->Send_Custom_Event(obj, SearchObj1, 202, 1, 0);
- }
- GameObject *SearchObj2 = Commands->Find_Object(1153845);
- if(SearchObj2)
- Commands->Set_Building_Power(SearchObj2, false);
- GameObject *SearchObj3 = Commands->Find_Object(405116);
- if(SearchObj3)
- Commands->Destroy_Object(SearchObj3);
- GameObject *SearchObj4 = Commands->Find_Object(405117);
- if(SearchObj4)
- Commands->Destroy_Object(SearchObj4);
- GameObject *SearchObj5 = Commands->Find_Object(1157690);
- if(SearchObj5)
- Commands->Set_Building_Power(SearchObj5, false);
- }
- class M02_Dam_MCT : public ScriptImpClass
- {
- void Damaged(Gameobject *obj, Gameobject *damager, float amount);
- bool Triggered;
- };
- void M02_Dam_MCT::Damaged(Gameobject *obj, Gameobject *damager, float amount)
- {
- if(Commands->Get_Health(obj) < 1.0)
- {
- Commands->Set_Health(obj, 0.100000);
- if(!Triggered)
- {
- Triggered = true;
- GameObject *SearchObject = Commands->Find_Object(1111112);
- if (SearchObject)
- {
- Commands->Send_Custom_Event(obj, SearchObject, 203, 1, 0);
- Vector3 ObjPos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(ObjPos);
- Commands->Grant_Key(Star, unknownkey, true);
- }
- Commands->Set_Animation_Frame(obj, "MCT_NOD.MCT_NOD", 7);
- }
- }
- }
- class M02_Helipad : public ScriptImpClass
- {
- void Killed(GameObject *obj,GameObject *killer);
- };
- void M02_Helipad::Killed(GameObject *obj,GameObject *killer)
- {
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- Commands->Send_Custom_Event(obj, SearchObj, 206, 1, 0);
- }
- class M02_Destroy_Objective : public ScriptImpClass
- {
- void unknown1(int this, int a2, int a3);
- void unknown2(int this, int a2, int a3, int a4);
- };
- void M02_Destroy_Objective::unknown1(int this, int a2, int a3) // int this, int a2, int a3
- {
- // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
- int Objective_ID = Get_Int_Parameter("Objective_ID");
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- {
- if (Objective_ID != 222)
- Commands->Send_Custom_Event(obj, SearchObj, Objective_ID, 1, 0);
- switch(Objective_ID)
- {
- case 212:
- Commands->Send_Custom_Event(obj, SearchObj, 113, 3, 0);
- break;
- case 214:
- GameObject *CinObject = Create_Object("Invisible_Object", Vector3(580.369995, 889.690002, -7.440000));
- if(CinObject)
- {
- Commands->Set_Facing(CinObject, -0.024902);
- Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop02_Rocket_24.txt");
- }
- break;
- case 215:
- // w00t nothing at all here.. lol but it showed up so im gonna leave it in here.
- case 216:
- Commands->Send_Custom_Event(obj, SearchObj, 115, 0, 0);
- break;
- case 204:
- Commands->Send_Custom_Event(obj, SearchObj, 105, 21, 0);
- break;
- case 222:
- result = Commands->Send_Custom_Event(obj, SearchObj, 116, 0, 0);
- break;
- }
- }
- }
- void M02_Destroy_Objective::unknown2(int this, int a2, int a3, int a4)
- {
- // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
- int Objective_ID = Get_Int_Parameter("Objective_ID");
- if(Objective_ID == 214)
- {
- GameObject *SearchObj = Commands->Find_Object(400510);
- if(SearchObj)
- Commands->Send_Custom_Event(obj, SearchObj, 99, 214, 0);
- }
- }
- class M02_Nod_Convoy_Truck : public ScriptImpClass
- {
- void Killed(GameObject *obj,GameObject *killer);
- };
- void M02_Nod_Convoy_Truck::Killed(GameObject *obj,GameObject *killer) // int a1, int a2
- {
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- Commands->Send_Custom_Event(obj, SearchObj, 900, 3, 0);
- }
- class M02_GDI_Soldier : public ScriptImpClass
- {
- void Created(GameObject *obj);
- void Timer_Expired(GameObject *obj,int number);
- void Poked(GameObject *obj,GameObject *poker);
- void unknown(int this, int a2, int a3);
- void Killed(GameObject *obj,GameObject *killer);
- void Damaged(GameObject *obj,GameObject *damager,float amount);
- bool AtStar;
- bool SpeakInterval;
- int RadioPick;
- };
- void M02_GDI_Soldier::Created(GameObject *obj)
- {
- Commands->Enable_Hibernation(obj, false);
- AtStar = false;
- SpeakInterval = false;
- RadioPick = 0;
- if(Get_Int_Parameter("Area_ID") == 1)
- {
- Commands->Innate_Disable(obj);
- if(Get_Int_Parameter("Soldier_Type") == 2)
- Commands->Start_Timer(obj, this, 10, 2);
- }
- else
- Commands->Start_Timer(obj, this, 1, 1);
- }
- void M02_GDI_Soldier::Timer_Expired(GameObject *obj,int number)
- {
- if(number != 1)
- {
- if(number != 2 || SpeakInterval)
- SpeakInterval = false
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Vector3 StarPos = Commands->Get_Position(Star);
- if(Commands->Get_Distance(Pos, StarPos) < 30.0)
- {
- const char *Conversation_Name;
- if(!RadioPick)
- Conversation_Name = "M02_GOMG_RADIO_01";
- if(!(RadioPick - 1))
- Conversation_Name = "M02_GOMG_RADIO_02";
- if((RadioPick - 1) == 1)
- Conversation_Name = "M02_GOMG_RADIO_03";
- int ConversationID = Commands->Create_Conversation(Conversation_Name, 99, 20, true);
- Commands->Join_Conversation(obj, ConversationID, true, true, true);
- Commands->Start_Conversation(ConversationID, 0);
- RadioPick++;
- }
- Commands->Start_Timer(obj, this, 10, 2);
- return;
- }
- if(Get_Int_Parameter("Area_ID") == 9)
- {
- GameObject *SearchObj = Commands->Find_Object(1153845);
- if(SearchObj)
- {
- if(Commands->Get_Building_Power(SearchObj))
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 71, 0);
- Params.Set_Movement(Vector3(1105.780029, 897.750000, 35.049999), 1.000000, 20.000000);
- // The following numbers are used but idk where they belong:
- // 5 times 1.
- // 1101004800 OR 20.000000
- // 1073741824 OR 2.000000
- // And a bunch of zeros
- Commands->Action_Goto(obj, Params);
- }
- }
- }
- else
- {
- if(!AtStar)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(Star)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 71, 1);
- Params.Set_Movement(Star, 1.000000, 20.000000);
- // The following numbers are used but idk where they belong:
- // 5 times 1.
- // 1101004800 OR 20.000000
- // 1073741824 OR 2.000000
- // And a bunch of zeros
- Commands->Action_Goto(obj, Params);
- }
- else
- AtStar = true;
- }
- }
- Commands->Start_Timer(obj, this, 10, 1);
- }
- void M02_GDI_Soldier::unknown(int this, int a2, int a3)
- {
- // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
- result = *(_DWORD *)(a3 + 12); // Unable to identify
- if(result > 1099)
- {
- if (result < 1199)
- {
- int Area_ID = Get_Int_Parameter("Area_ID");
- if((result - 1100) == Area_ID)
- {
- AtStar = true;
- if (Area_ID)
- {
- if (Area_ID == 2)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 2.000000, 81);
- Params.Set_Movement(Vector(648.770020, 300.739990, -0.070332), 0.300000, 1.000000);
- // The following numbers are used but idk where they belong:
- // 5 times 1.
- // 1101004800 OR 20.000000
- // 1073741824 OR 2.000000
- // And a bunch of zeros
- Commands->Action_Goto(obj, Params);
- }
- }
- else
- Commands->Action_Reset(obj, 100);
- }
- }
- }
- }
- void M02_GDI_Soldier::Killed(GameObject *obj,GameObject *killer)
- {
- int Area_ID = Get_Int_Parameter("Area_ID");
- if(!Area_ID)
- {
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- Commands->Send_Custom_Event(obj, SearchObj, 1000, 1000, 0);
- }
- if(Area_ID == 9)
- {
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- Commands->Send_Custom_Event(obj, result, 1000, 1001, 0);
- }
- }
- void M02_GDI_Soldier::Damaged(GameObject *obj,GameObject *damager,float amount)
- {
- if(damager)
- {
- if (!amount)
- {
- if(!SpeakInterval)
- {
- SpeakInterval = true;
- int Soldier_Type = Get_Int_Parameter("Soldier_Type") - 1;
- if (Soldier_Type)
- {
- if(!(Soldier_Type - 3))
- {
- int M02_GEGR_COVER_01 = Commands->Create_Conversation("M02_GEGR_COVER_01", 99, 50, true);
- Commands->Join_Conversation(obj, M02_GEGR_COVER_01, true, true, false);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_GEGR_COVER_01, true, true, false);
- Commands->Start_Conversation(M02_GEGR_COVER_01, 0);
- }
- }
- else
- {
- int M02_GERS_COVER_01 = Commands->Create_Conversation("M02_GERS_COVER_01", 99, 50, true);
- Commands->Join_Conversation(obj, M02_GERS_COVER_01, true, true, false);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, M02_GEGR_COVER_01, true, true, false);
- Commands->Start_Conversation(M02_GEGR_COVER_01, 0);
- }
- }
- }
- }
- }
- class M02_Stationary_Vehicle : public ScriptImpClass
- {
- void Created(GameObject *obj);
- void unknown(int this, int a2, int a3);
- void Enemy_Seen(GameObject *obj,GameObject *enemy);
- void Killed(GameObject *obj,GameObject *killer);
- void Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason);
- void Timer_Expired(GameObject *obj,int number);
- };
- void M02_Stationary_Vehicle::Created(GameObject *obj)
- {
- int Area_ID = Get_Int_Parameter("Area_ID");
- Commands->Enable_Enemy_Seen(obj, false);
- if(Area_ID == 99)
- {
- Commands->Innate_Disable(obj);
- Commands->Start_Timer(obj, this, 5.330000, 1);
- }
- }
- void M02_Stationary_Vehicle::unknown(int this, int a2, int a3)
- {
- // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
- int Area_ID = Get_Int_Parameter("Area_ID");
- int ObjID = Commands->Get_ID(obj);
- if(Area_ID == 2)
- {
- if(ObjID == 401016)
- {
- int MX2DSGN_DSGN0008 = Commands->Create_Conversation("MX2DSGN_DSGN0008", 100, 300, true);
- Commands->Join_Conversation(0, MX2DSGN_DSGN0008, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, MX2DSGN_DSGN0008, true, false, false);
- Commands->Start_Conversation(MX2DSGN_DSGN0008, 0);
- }
- else if(ObjID == 401167)
- {
- GameObject *SearchObj = Commands->Find_Object(401016);
- if(SearchObj)
- {
- int MX2DSGN_DSGN0007 = Commands->Create_Conversation("MX2DSGN_DSGN0007", 100, 300, true);
- Commands->Join_Conversation(SearchObj, MX2DSGN_DSGN0007, true, true, true);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, MX2DSGN_DSGN0007, true, false, false);
- Commands->Start_Conversation(MX2DSGN_DSGN0007, 0);
- }
- }
- }
- }
- void M02_Stationary_Vehicle::Enemy_Seen(GameObject *obj,GameObject *enemy)
- {
- int Area_ID = Get_Int_Parameter("Area_ID");
- if(Area_ID != 99)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 2.000000, 90);
- Params.Set_Attack(enemy, 300.000000, 0, true);
- // The following numbers are used but idk where they belong:
- // 4 times 1.
- // 1065353216 OR 1.000000
- // And a bunch of zeros
- Commands->Action_Attack(obj, Params);
- Commands->Start_Timer(obj, this, 5, 2);
- }
- }
- void M02_Stationary_Vehicle::Killed(GameObject *obj,GameObject *killer)
- {
- if(*(_DWORD *)(killer + 12) == 1000 && *(_DWORD *)(killer + 16)) // unknown
- {
- if(!Commands->Get_Player_Type(obj))
- Commands->Send_Custom_Event(obj, *(_DWORD *)(killer + 16), 100, 1, 0);
- }
- }
- void M02_Stationary_Vehicle::Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason)
- {
- if(!action_id && !complete_reason)
- Commands->Enable_Enemy_Seen(obj, true);
- }
- void M02_Stationary_Vehicle::Timer_Expired(GameObject *obj,int number)
- {
- if(number == 1)
- result = Apply_Damage(obj, 10000, "Blamokiller", 0);
- else if(number == 2)
- Commands->Action_Reset(obj, 100);
- }
- class M02_Nod_Apache : public ScriptImpClass
- {
- void Created(GameObject *obj);
- void Timer_Expired(GameObject *obj, int number);
- int UnknownAttackParam;
- };
- void M02_Nod_Apache::Created(GameObject *obj)
- {
- float TimerLength = 1;
- int Area_ID = Get_Int_Parameter("Area_ID");
- if(Area_ID)
- {
- if(Area_ID == 15)
- {
- UnknownAttackParam = 1;
- TimerLength = 15;
- }
- else if(Area_ID == 24)
- UnknownAttackParam = 24;
- }
- else
- {
- UnknownAttackParam = 0;
- TimerLength = 8;
- }
- Commands->Enable_Engine(obj, true);
- Commands->Disable_Physical_Collisions(obj);
- Commands->Start_Timer(obj, this, TimerLength, 1);
- Commands->Start_Timer(obj, this, 15, 3);
- }
- void M02_Nod_Apache::Timer_Expired(GameObject *obj, int number)
- {
- if(number == 1)
- {
- if(UnknownAttackParam <= 400310)
- {
- if(UnknownAttackParam != 400310)
- {
- if(UnknownAttackParam <= 24)
- {
- if(UnknownAttackParam == 24)
- UnknownAttackParam = 400544;
- else
- {
- if(UnknownAttackParam)
- {
- if(UnknownAttackParam == 1)
- UnknownAttackParam = 401169;
- }
- else
- UnknownAttackParam = 400296;
- }
- goto ATTACK;
- }
- if(UnknownAttackParam - 400296)
- {
- if((UnknownAttackParam - 400296) == 8)
- UnknownAttackParam = 400310;
- goto ATTACK;
- }
- }
- UnknownAttackParam = 400304;
- goto ATTACK;
- }
- if(UnknownAttackParam > 401173)
- {
- if(UnknownAttackParam != 401180)
- goto ATTACK;
- }
- else
- {
- if(UnknownAttackParam == 401173)
- {
- UnknownAttackParam = 401180;
- goto ATTACK;
- }
- if(UnknownAttackParam == 400544)
- {
- UnknownAttackParam = -1;
- goto ATTACK;
- }
- if(UnknownAttackParam != 401169)
- {
- ATTACK:
- if(UnknownAttackParam != -1)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 90, 0); // Possibly Params.Set_Basic(this, 90, 0, Commands->Get_Difficulty_Level());
- Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 200.000000, 0, true);
- Params.MoveArrivedDistance = 5.000000; // Maybe..
- // The following numbers are used but idk where they belong:
- // 5 times 1.
- // 1101004800 OR 20.0000000
- // 1073741824 OR 2.000000
- // 1084227584 OR 5.000000 Used it in MoveArrivedDistance
- // This calculation Commands->Get_Difficulty_Level() * 0.1 + 0.2
- // UnknownAttackParam
- // 1 time 0.0
- // 1 time 1.0
- // And a bunch of zeros
- Commands->Action_Attack(obj, Params);
- }
- Commands->Start_Timer(obj, this, 5, 2);
- return;
- }
- }
- UnknownAttackParam = 401173;
- goto ATTACK;
- }
- if(number == 2)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 90, 0);
- Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 200.000000, 0, true);
- Params.MoveArrivedDistance = 5.000000; // Maybe..
- // The following numbers are used but idk where they belong:
- // 5 times 1.
- // 1101004800 OR 20.0000000
- // 1073741824 OR 2.000000
- // 1084227584 OR 5.000000 Used it in MoveArrivedDistance
- // 1 time 0.0
- // And a bunch of zeros
- Commands->Action_Attack(obj, Params);
- Commands->Start_Timer(obj, this, 5, 1);
- }
- if(number == 3)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(Star)
- {
- Vector3 StarPos = Commands->Get_Position(Star);
- if(Commands->Get_Distance(Pos, StarPos) > 300.0)
- Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
- }
- Commands->Start_Timer(obj, this, 15, 3);
- }
- }
- class M02_Nod_Vehicle : public ScriptImpClass
- {
- void Created(GameObject *obj);
- void Timer_Expired(GameObject *obj, int number);
- };
- void M02_Nod_Vehicle::Created(GameObject *obj)
- {
- Commands->Enable_Enemy_Seen(obj, true);
- Commands->Enable_Engine(obj, true);
- int Area_ID = Get_Int_Parameter("Area_ID") - 2;
- if(Area_ID)
- {
- v4 = v3 - 1;
- if(Area_ID - 1)
- {
- if((Area_ID - 1) == 1)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 98, 0);
- Params.Set_Movement(Vector3(0,0,0), 1.000000, 5.000000);
- Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 300.000000, 0, true);
- Params.WaypathID = 400454; // maybe...
- Commands->Action_Attack(obj, Params);
- }
- }
- else
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 98, 0);
- Params.Set_Movement(Vector3(0,0,0), 1.000000, 5.000000);
- Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 300.000000, 0, true);
- Set_Attack((int)&v22, v17, 1133903872, 0, 1);
- Params.WaypathID = 400416; // maybe...
- Commands->Action_Attack(obj, Params);
- }
- }
- else
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 98, 0);
- Params.Set_Movement(Vector3(0,0,0), 1.000000, 5.000000);
- Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 300.000000, 0, true);
- Params.WaypathID = 400375; // maybe...
- Commands->Action_Attack(obj, Params);
- }
- Commands->Start_Timer(obj, this, 15, 1);
- }
- void M02_Nod_Vehicle::Timer_Expired(GameObject *obj, int number)
- {
- if(number == 1)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(Star)
- {
- Vector3 StarPos = Commands->Get_Position(Star);
- if(Commands->Get_Distance(Pos, StarPos) > 300.0)
- Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
- }
- Commands->Start_Timer(obj, this, 15, 1);
- }
- }
- class M02_Player_Vehicle : public ScriptImpClass
- {
- void Created(GameObject *obj);
- void Timer_Expired(GameObject *obj, int number);
- void Destroyed(GameObject *obj);
- void Custom(GameObject *obj,int type,int param,GameObject *sender);
- bool Entered;
- };
- void M02_Player_Vehicle::Created(GameObject *obj)
- {
- Entered = false;
- Commands->Enable_Vehicle_Transitions(obj, true);
- Commands->Set_Player_Type(obj, -2);
- Commands->Start_Timer(obj, this, 15, 1);
- int ObjID = Commands->Get_ID(obj);
- GameObject *SearchObj1 = Commands->Find_Object(1100085);
- if(SearchObj1)
- Commands->Send_Custom_Event(obj, SearchObj1, 100008, ObjID, 0.500000);
- GameObject *SearchObj2 = Commands->Find_Object(1100094);
- if(SearchObj2)
- Commands->Send_Custom_Event(obj, SearchObj2, 100008, ObjID, 0.500000);
- GameObject *SearchObj3 = Commands->Find_Object(1100120);
- if(SearchObj3)
- Commands->Send_Custom_Event(obj, SearchObj3, 100008, ObjID, 0.500000);
- GameObject *SearchObj4 = Commands->Find_Object(1100130);
- if(SearchObj4)
- result = Commands->Send_Custom_Event(obj, SearchObj4, 100008, ObjID, 0.500000);
- }
- void M02_Player_Vehicle::Timer_Expired(GameObject *obj, int number)
- {
- if(number == 1)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(Star)
- {
- Vector3 StarPos = Commands->Get_Position(Star);
- if(Commands->Get_Distance(Pos, StarPos) > 300.0)
- Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
- }
- Commands->Start_Timer(obj, this, 15, 1);
- }
- }
- void M02_Player_Vehicle::Destroyed(GameObject *obj)
- {
- int Area_ID = Get_Int_Parameter("Area_ID");
- GameObject SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- Commands->Send_Custom_Event(obj, SearchObj, 112, Area_ID, 0);
- if(Area_ID == 2)
- {
- if(!Entered)
- Commands->Send_Custom_Event(obj, SearchObj, 221, 2, 0);
- }
- }
- void M02_Player_Vehicle::Custom(GameObject *obj,int type,int param,GameObject *sender)
- {
- if(type == CUSTOM_EVENT_VEHICLE_ENTERED)
- {
- int Area_ID = Get_Int_Parameter("Area_ID");
- if(Area_ID == 2)
- {
- if (!Entered)
- {
- Entered = true;
- GameObject *SearchObj = Commands->Find_Object(1111112);
- if(SearchObj)
- Commands->Send_Custom_Event(obj, SearchObj, 221, 1, 0);
- }
- }
- }
- }
- class M02_Nod_Sakura : public ScriptImpClass
- {
- void Created(GameObject *obj);
- void Enemy_Seen(GameObject *obj,GameObject *enemy);
- void Timer_Expired(GameObject *obj,int number);
- void Killed(GameObject *obj,GameObject *killer);
- int Unknown1;
- };
- void M02_Nod_Sakura::Created(GameObject *obj)
- {
- Unknown1 = 0;
- Commands->Enable_Enemy_Seen(obj, true);
- Commands->Enable_Engine(obj, true); // LOL?
- Commands->Disable_Physical_Collisions(obj);
- ActionParamsStruct Params;
- Params.Set_Basic(this, 91, 0);
- Params.Set_Movement(Vector3(0,0,0), 2.500000, 1.000000);
- Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 200.000000, 0, true); // probably.. but strange
- Params.WaypathID = 400397; // probably.
- Params.MovePathfind = true; // probably.
- Commands->Action_Goto(obj, Params);
- Commands->Start_Timer(obj, this, 15, 1);
- Commands->Start_Timer(obj, this, 10, 3);
- }
- void M02_Nod_Sakura::Enemy_Seen(GameObject *obj,GameObject *enemy)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 92, 2);
- Params.Set_Attack(enemy, 300.000000, 0, true);
- Commands->Action_Attack(obj, Params); // this one was the most vague ActionParamsStruct i've had so far.. don't completly trust this one
- }
- void M02_Nod_Sakura::Timer_Expired(GameObject *obj,int number)
- {
- if(number == 1)
- {
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(Star)
- {
- Vector3 StarPos = Commands->Get_Position(Star);
- if(Commands->Get_Distance(Pos, StarPos) > 300.0)
- Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
- }
- Commands->Start_Timer(obj, this, 15, 1);
- }
- else if(number == 2)
- Commands->Destroy_Object(obj);
- else if(number == 3)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 93, 1);
- Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 200.000000, 0, true);
- Params.MoveArrivedDistance = 5.000000; // probably
- Commands->Action_Attack(obj, Params);
- }
- }
- void M02_Nod_Sakura::Killed(GameObject *obj,GameObject *killer)
- {
- if(*(_DWORD *)(killer + 12) == 1000 && *(_DWORD *)(killer + 16)) // Have no clue yet what member function is called right here.
- Commands->Send_Custom_Event(obj, *(_DWORD *)(killer + 16), 100, 1, 0);
- }
- class M02_Approach_Vehicle : public ScriptImpClass
- {
- void Custom(GameObject *obj,int type,int param,GameObject *sender);
- void Timer_Expired(GameObject *obj,int number);
- };
- void M02_Approach_Vehicle::Custom(GameObject *obj,int type,int param,GameObject *sender)
- {
- if(!type && !param)
- {
- Commands->Enable_Engine(obj, true);
- ActionParamsStruct Params;
- Params.Set_Basic(this, 100, 0);
- Params.Set_Movement(Vector3(0,0,0), 1.000000, 1.000000);
- Params.MovePathfind = true; // probably.
- int Area_ID = Get_Int_Parameter("Area_ID");
- if(Area_ID - 1)
- {
- if(Area_ID - 4)
- {
- if((Area_ID - 4) == 2)
- Params.WaypathID = 401039;
- }
- else
- Params.WaypathID = 401031;
- }
- else
- Params.WaypathID = 401009;
- Commands->Action_Goto(obj, Params);
- Commands->Start_Timer(obj, this, 6, 0);
- }
- }
- void M02_Approach_Vehicle::Timer_Expired(GameObject *obj,int number)
- {
- Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
- }
- class M02_Destroy_Vehicle : public ScriptImpClass
- {
- void Created(GameObject *obj);
- void Timer_Expired(GameObject *obj,int number);
- void unknown1(void *this, int a2, int a3, int a4);
- void unknown2(int this, int a2, int a3);
- };
- void M02_Destroy_Vehicle::Created(GameObject *obj)
- {
- Commands->Enable_Engine(obj, true);
- Commands->Disable_Physical_Collisions(obj);
- Commands->Start_Timer(obj, this, 4, 1);
- }
- void M02_Destroy_Vehicle::Timer_Expired(GameObject *obj,int number)
- {
- if(number == 1)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 99, 0);
- Params.Set_Movement(Vector3(0,0,0), 1.000000, 2.500000);
- Params.WaypathID = 400993; // probably.
- Params.MovePathfind = true;
- Commands->Action_Goto(obj, Params);
- Commands->Start_Timer(obj, this, 20, 2);
- }
- else if(number == 2)
- Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
- }
- void M02_Destroy_Vehicle::unknown1(void *this, int a2, int a3, int a4)
- {
- // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- if(a3 != Star)
- Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
- }
- void M02_Destroy_Vehicle::unknown2(int this, int a2, int a3)
- {
- // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
- ActionParamsStruct Params;
- Params.Set_Basic(this, 90, 0);
- Params.Set_Movement(Vector3(0,0,0), 1.000000, 2.000000);
- Params.Set_Attack(a3, 200.000000, 0, true);
- Commands->Action_Attack(obj, Params);
- }
- class M02_Mendoza : public ScriptImpClass
- {
- void Register_Auto_Save_Variables();
- void Created(GameObject *obj);
- void Damaged(GameObject *obj,GameObject *damager,float amount);
- void Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason);
- void Timer_Expired(GameObject *obj,int number);
- float Health;
- float ShieldStr;
- bool DidFlee;
- bool MoveRandom;
- int VoiceTwiddler;
- };
- void M02_Mendoza::Register_Auto_Save_Variables()
- {
- Auto_Save_Variable(&DidFlee, 1, 1);
- Auto_Save_Variable(&Health, 4, 2);
- Auto_Save_Variable(&ShieldStr, 4, 3);
- Auto_Save_Variable(&VoiceTwiddler, 4, 4);
- Auto_Save_Variable(&MoveRandom, 1, 5);
- }
- void M02_Mendoza::Created(GameObject *obj)
- {
- Health = Commands->Get_Health(obj);
- ShieldStr = Commands->Get_Shield_Strength(obj);
- DidFlee = false;
- MoveRandom = true;
- VoiceTwiddler = 0;
- Commands->Innate_Disable(obj);
- ActionParamsStruct Params;
- Params.Set_Basic(this, 98, 3);
- Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 300.000000, 0, true);
- Commands->Action_Attack(obj, Params);
- Commands->Start_Timer(obj, this, 2, 1);
- }
- void M02_Mendoza::Damaged(GameObject *obj,GameObject *damager,float amount)
- {
- Commands->Set_Health(obj, Health);
- ShieldStr -= 2.0; // Lol all damage done to this bastard is capped to 2.
- Commands->Set_Shield_Strength(obj, ShieldStr);
- if(ShieldStr < 1.0 && !DidFlee)
- {
- DidFlee = true;
- ActionParamsStruct Params;
- Params.Set_Basic(this, 100, 1);
- Params.Set_Movement(Vector3(1260.006958, 535.460022, 18.427999), 0.800000, 5.000000);
- Commands->Action_Goto(obj, Params);
- }
- }
- void M02_Mendoza::Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason)
- {
- if(action_id == 1)
- {
- Commands->Innate_Disable(obj);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *CinObject = Create_Object("Invisible_Object", Pos);
- if(CinObject)
- {
- Commands->Attach_Script(CinObject, "Test_Cinematic", "XG_ROPE_EVAC_F.txt");
- int MX2DSGN_DSGN0025 = Commands->Create_Conversation("MX2DSGN_DSGN0025", 100, 300, true);
- Commands->Join_Conversation(obj, MX2DSGN_DSGN0025, true, false, false);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, MX2DSGN_DSGN0025, true, false, false);
- Commands->Join_Conversation(0, MX2DSGN_DSGN0025, true, true, true);
- Commands->Start_Conversation(MX2DSGN_DSGN0025, 0);
- }
- }
- else if(action_id == 2)
- {
- ActionParamsStruct Params;
- Params.Set_Basic(this, 98, 3);
- Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 300.000000, 0, true);
- Commands->Action_Attack(obj, Params);
- }
- }
- void M02_Mendoza::Timer_Expired(GameObject *obj,int number)
- {
- if(number == 1)
- {
- if(!DidFlee)
- {
- VoiceTwiddler++;
- if (VoiceTwiddler > 6)
- VoiceTwiddler = 1;
- int ConversationID;
- switch(VoiceTwiddler)
- {
- case 1:
- ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0019", 100, 300, true);
- break;
- case 2:
- ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0020", 100, 300, true);
- break;
- case 3:
- ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0021", 100, 300, true);
- break;
- case 4:
- ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0022", 100, 300, true);
- break;
- case 5:
- ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0023", 100, 300, true);
- break;
- case 6:
- ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0024", 100, 300, true);
- break;
- default:
- ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0024", 100, 300, true);
- }
- Commands->Join_Conversation(obj, ConversationID, true, false, false);
- Vector3 Pos = Commands->Get_Position(obj);
- GameObject *Star = Commands->Get_A_Star(Pos);
- Commands->Join_Conversation(Star, ConversationID, true, false, false);
- Commands->Start_Conversation(ConversationID, 0);
- Commands->Start_Timer(obj, this, 7, 1);
- if(MoveRandom)
- MoveRandom = false;
- else
- {
- MoveRandom = true;
- Commands->Action_Reset(obj, 100);
- ActionParamsStruct Params;
- Params.Set_Basic(this 99, 2);
- Vector3 GotoPos = Vector3(0,0,0);
- int Random = Commands->Get_Random_Int(0, 4); // v16
- if(Random > 3)
- Random = 3;
- switch(Random)
- {
- case 0:
- GotoPos = Vector3(1248.592041, 568.431030, 17.396000);
- break;
- case 1:
- GotoPos = Vector3(1264.680054, 564.458984, 17.816000)
- break;
- case 2:
- GotoPos = Vector3(1270.219971, 541.406006, 17.978001);
- break;
- case 3:
- GotoPos = Vector3(1251.213013, 544.658020, 17.854000);
- break;
- }
- Params.Set_Movement(GotoPos, 0.800000, 5.000000);
- Commands->Action_Goto(obj, Params);
- }
- }
- }
- }
- class M02_Nod_Jet : public ScriptImpClass
- {
- void Created(GameObject *obj);
- void Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason);
- };
- void M02_Nod_Jet::Created(GameObject *obj)
- {
- Commands->Enable_Engine(obj, true);
- Commands->Disable_Physical_Collisions(obj);
- ActionParamsStruct Params;
- Params.Set_Basic(this, 100, 1);
- Params.Set_Movement(Vector3(1143.089966, 702.080017, 70.500000), 4.000000, 5.000000);
- Commands->Action_Goto(obj, Params);
- }
- void M02_Nod_Jet::Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason)
- {
- if(action_id == 1)
- Commands->Destroy_Object(obj);
- }
- class M02_Nod_Jet_Waypath : public ScriptImpClass
- {
- void Created(GameObject *obj);
- };
- void M02_Nod_Jet_Waypath::Created(GameObject *obj)
- {
- Commands->Enable_Engine(obj, true);
- Commands->Disable_Physical_Collisions(obj);
- ActionParamsStruct Params;
- Params.Set_Basic(this, 100, 1);
- Params.Set_Movement(Vector3(0,0,0), 4.000000, 5.000000);
- Params.WaypathID = 403389;
- Params.MovePathfind = true;
- Commands->Action_Goto(obj, Params);
- }
- class M02_GDI_Helicopter : public ScriptImpClass
- {
- void Created(GameObject *obj);
- };
- void M02_GDI_Helicopter::Created(GameObject *obj)
- {
- Commands->Enable_Engine(obj, true);
- Commands->Disable_Physical_Collisions(obj);
- ActionParamsStruct Params;
- Params.Set_Basic(this, 100, 1);
- Params.Set_Movement(Vector3(100.750000, 17.420000, -0.016740), 1.000000, 5.000000); // Location was a bit weird, don't completly trust this one. Its either this or the other way around (Vector3(-0.016740, 17.420000, 100.750000)) or maybe something even weirder...
- Commands->Action_Goto(obj, Params);
- }
- class M02_Commando_Start : public ScriptImpClass
- {
- void Created(GameObject *obj);
- };
- void M02_Commando_Start::Created(GameObject *obj)
- {
- Commands->Give_PowerUp(obj, "POW_MineRemote_Player", false);
- Commands->Give_PowerUp(obj, "POW_Chaingun_Player", false);
- Commands->Give_PowerUp(obj, "POW_SniperRifle_Player", false);
- }
- class M02_Data_Disk : public ScriptImpClass
- {
- void Custom(GameObject *obj,int type,int param,GameObject *sender);
- };
- void M02_Data_Disk::Custom(GameObject *obj,int type,int param,GameObject *sender)
- {
- if(type == CUSTOM_EVENT_POWERUP_GRANTED)
- {
- int Disk_ID = Get_Int_Parameter("Disk_ID") - 1;
- if(Disk_ID)
- {
- if(Disk_ID == 1)
- Commands->Clear_Map_Region_By_Pos(Vector3(1016.429993, 885.960022, 35.410000), 30);
- else
- Commands->Clear_Map_Region_By_Pos(Vector3(1204.459961, 565.349976, 37.840000), 15);
- }
- else
- Commands->Clear_Map_Region_By_Pos(Vector3(425.760010, 840.780029, 8.190000), 15);
- Commands->Set_HUD_Help_Text(7587, Vector3(0.196000, 0.882000, 0.196000));
- }
- }
- class M02_Encyclopedia_Reveal : public ScriptImpClass
- {
- void Custom(GameObject *obj,int type,int param,GameObject *sender);
- };
- void M02_Encyclopedia_Reveal::Custom(GameObject *obj,int type,int param,GameObject *sender)
- {
- if(type == CUSTOM_EVENT_POWERUP_GRANTED)
- {
- if(Get_Int_Parameter("Disk_ID") == 1)
- Commands->Reveal_Encyclopedia_Vehicle(5);
- else
- Commands->Reveal_Encyclopedia_Building(15);
- Commands->Set_HUD_Help_Text(7588, Vector3(0.196000, 0.882000, 0.196000));
- }
- }
- ScriptRegistrant<M02_Encyclopedia_Reveal> M02_Encyclopedia_Reveal_Registrant("M02_Encyclopedia_Reveal", "Disk_ID:int");
- ScriptRegistrant<M02_Data_Disk> M02_Data_Disk_Registrant("M02_Data_Disk", "Disk_ID:int");
- ScriptRegistrant<M02_Commando_Start> M02_Commando_Start_Registrant("M02_Commando_Start", "");
- ScriptRegistrant<M02_GDI_Helicopter> M02_GDI_Helicopter_Registrant("M02_GDI_Helicopter", "");
- ScriptRegistrant<M02_Nod_Jet_Waypath> M02_Nod_Jet_Waypath_Registrant("M02_Nod_Jet_Waypath", "");
- ScriptRegistrant<M02_Nod_Jet> M02_Nod_Jet_Registrant("M02_Nod_Jet", "");
- ScriptRegistrant<M02_Mendoza> M02_Mendoza_Registrant("M02_Mendoza", "");
- ScriptRegistrant<M02_Destroy_Vehicle> M02_Destroy_Vehicle_Registrant("M02_Destroy_Vehicle", "");
- ScriptRegistrant<M02_Approach_Vehicle> M02_Approach_Vehicle_Registrant("M02_Approach_Vehicle", "Area_ID:int");
- ScriptRegistrant<M02_Player_Vehicle> M02_Player_Vehicle_Registrant("M02_Player_Vehicle", "Area_ID:int");
- ScriptRegistrant<M02_Nod_Vehicle> M02_Nod_Vehicle_Registrant("M02_Nod_Vehicle", "Area_ID:int");
- ScriptRegistrant<M02_Nod_Apache> M02_Nod_Apache_Registrant("M02_Nod_Apache", "Area_ID:int");
- ScriptRegistrant<M02_Stationary_Vehicle> M02_Stationary_Vehicle_Registrant("M02_Stationary_Vehicle", "Area_ID:int");
- ScriptRegistrant<M02_GDI_Soldier> M02_GDI_Soldier_Registrant("M02_GDI_Soldier", "Area_ID:int, Soldier_Type=0:int");
- ScriptRegistrant<M02_Nod_Convoy_Truck> M02_Nod_Convoy_Truck_Registrant("M02_Nod_Convoy_Truck", "");
- ScriptRegistrant<M02_Destroy_Objective> M02_Destroy_Objective_Registrant("M02_Destroy_Objective", "Objective_ID:int");
- ScriptRegistrant<M02_Helipad> M02_Helipad_Registrant("M02_Helipad", "");
- ScriptRegistrant<M02_Dam_MCT> M02_Dam_MCT_Registrant("M02_Dam_MCT", "");
- ScriptRegistrant<M02_Power_Plant> M02_Power_Plant_Registrant("M02_Power_Plant", "");
- ScriptRegistrant<M02_Obelisk> M02_Obelisk_Registrant("M02_Obelisk", "");
- ScriptRegistrant<M02_Nod_Soldier> M02_Nod_Soldier_Registrant("M02_Nod_Soldier", "Area_Number:int,Area_Officer:int,Pre_Placed:int");
- ScriptRegistrant<M02_Reset_Spawn> M02_Reset_Spawn_Registrant("M02_Reset_Spawn", "Area_ID:int,Spawn_Type:int");
- ScriptRegistrant<M02_Objective_Zone> M02_Objective_Zone_Registrant("M02_Objective_Zone", "");
- ScriptRegistrant<M02_Objective_Controller> M02_Objective_Controller_Registrant("M02_Objective_Controller", "");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement