home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 April / Gamestar_83_2006-04_dvd.iso / Dema / demowot_english.exe / Script / Source / tutorial_test1.sma < prev    next >
Text File  |  2005-03-11  |  31KB  |  1,012 lines

  1. // TUNING PARAMETERS:
  2. // Here comes the parameters, which need fine tuning.
  3. //NYESI
  4.  
  5. // TODO: ===============================================================================================
  6.  
  7.  
  8. // DECLARATIONS: =======================================================================================
  9.  
  10.  
  11. //**Ez itt a kis korbeszaladgalos, lehasalos gyakorlatozo fickok konvoja
  12. const gConvoyTotal = 1;
  13. new gConvoyArray[gConvoyTotal][4] = {{0,0,0}};
  14. new gConvoyNames[gConvoyTotal][25] = {"edz_"};
  15. new gConvoyWPNames[gConvoyTotal][25] = {"wpg"};
  16. new gConvoyCount[gConvoyTotal] = {4};
  17. new gConvoyWPCount[gConvoyTotal] = {17};
  18. new Float:gConvoyStartDelays[gConvoyTotal] = {15.0};
  19. //**
  20.  
  21. #include "script.inc"
  22. #include "visualeffects.inc"
  23. #include "convoycontrol.inc"
  24.  
  25. //**Amit dumalnak, ahhoz a kiiras itt lakozik ebben a tombben. Az ures sztring mindig valami vezerles (altalaban amikor eppen nincs duma)
  26. new gSpeechID[49][] = {
  27.         {"#iTUT_01#"},    //0
  28.         {"#iTUT_02#"},    //1 
  29.         {"#iTUT_03#"},    //2    
  30.         {""},            //3
  31.         {"#iTUT_04#"},    //4    
  32.         {"#iTUT_05#"},    //5
  33.         {"#iTUT_06#"},    //6
  34.         {"#iTUT_07#"},    //7
  35. //        {"#iTUT_08#"},    //8 Ez nem kell
  36.         {"#iTUT_09#"},    //9
  37.         {"#iTUT_10#"},    //10
  38.         {"#iTUT_11#"},    //11
  39.         {"#iTUT_12#"},    //12
  40.         {"#iTUT_13#"},    //13
  41.         {"#iTUT_14#"},    //14
  42.         {""},                                                //15
  43.         {"#iTUT_15#"},    //16
  44.         {""},                                                //17
  45.         {"#iTUT_16#"},    //18
  46.         {"#iTUT_17#"},    //19
  47.         {"#iTUT_18#"},    //20
  48.         {"#iTUT_19#"},    //21
  49.         {""},                                                //22
  50.         {"#iTUT_20#"},    //23
  51.         {""},                                                //24        
  52.         {"#iTUT_21#"},    //25
  53.         {"#iTUT_22#"},    //26
  54.         {"#iTUT_23#"},    //27
  55.         {"#iTUT_24#"},    //28
  56.         {"#iTUT_25#"},    //29
  57.         {""},                                                //30
  58.         {"#iTUT_26#"},    //31
  59.         {""},                                                //32
  60.         {"#iTUT_27#"},    //33
  61.         {"#iTUT_28#"},    //34
  62.         {"#iTUT_29#"},    //35
  63.         {"#iTUT_30#"},    //36
  64.         {"#iTUT_31#"},    //37
  65.         {"#iTUT_32#"},    //38
  66.         {"#iTUT_33#"},    //39
  67.         {""},                                                //40
  68.         {"#iTUT_34#"},    //41
  69.         {""},                                                //42        
  70.         {"#iTUT_35#"},    //43
  71.         {"#iTUT_36#"},    //44
  72.         {"#iTUT_37#"},    //45
  73.         {"#iTUT_38#"},    //46
  74.         {"#iTUT_39#"},    //47
  75.         {""},                                                //48
  76.         {"#iTUT_40#"}    //49
  77. }
  78.  
  79.  
  80. //**Ez itt a sok duma tombje. Ezeken lepeget vegig a ... fuggveny.
  81. new gSoundID[49][] = {
  82.         {"sounds\\game\\speech\\mission\\Tut_0_001.mp3"},
  83.         {"sounds\\game\\speech\\mission\\Tut_0_002.mp3"},
  84.         {"sounds\\game\\speech\\mission\\Tut_0_003.mp3"},
  85.         {""},
  86.         {"sounds\\game\\speech\\mission\\Tut_1_001.mp3"},
  87.         {"sounds\\game\\speech\\mission\\Tut_1_002.mp3"},
  88.         {"sounds\\game\\speech\\mission\\Tut_1_003.mp3"},
  89.         {"sounds\\game\\speech\\mission\\Tut_1_004.mp3"},
  90. //        {"sounds\\game\\speech\\mission\\Tut_1_006.mp3"},
  91.         {"sounds\\game\\speech\\mission\\Tut_1_007.mp3"},
  92.         {"sounds\\game\\speech\\mission\\Tut_1_009.mp3"},
  93.         {"sounds\\game\\speech\\mission\\Tut_1_010.mp3"},
  94.         {"sounds\\game\\speech\\mission\\Tut_1_011.mp3"},
  95.         {"sounds\\game\\speech\\mission\\Tut_1_012.mp3"},
  96.         {"sounds\\game\\speech\\mission\\Tut_1_013.mp3"},
  97.         {""}, 
  98.         {"sounds\\game\\speech\\mission\\Tut_1_015.mp3"},
  99.         {""},
  100.         {"sounds\\game\\speech\\mission\\Tut_1_016.mp3"},
  101.         {"sounds\\game\\speech\\mission\\Tut_1_017.mp3"},
  102.         {"sounds\\game\\speech\\mission\\Tut_1_018.mp3"},
  103.         {"sounds\\game\\speech\\mission\\Tut_1_019.mp3"},
  104.         {""},
  105.         {"sounds\\game\\speech\\mission\\Tut_2_001.mp3"},
  106.         {""},
  107.         {"sounds\\game\\speech\\mission\\Tut_2_003.mp3"},
  108.         {"sounds\\game\\speech\\mission\\Tut_2_004.mp3"},
  109.         {"sounds\\game\\speech\\mission\\Tut_2_005.mp3"},
  110.         {"sounds\\game\\speech\\mission\\Tut_2_006.mp3"},
  111.         {"sounds\\game\\speech\\mission\\Tut_2_008.mp3"},
  112.         {""},
  113.         {"sounds\\game\\speech\\mission\\Tut_3_001.mp3"},
  114.         {""},
  115.         {"sounds\\game\\speech\\mission\\Tut_3_002.mp3"},
  116.         {"sounds\\game\\speech\\mission\\Tut_3_003.mp3"},
  117.         {"sounds\\game\\speech\\mission\\Tut_3_004.mp3"},
  118.         {"sounds\\game\\speech\\mission\\Tut_3_005.mp3"},
  119.         {"sounds\\game\\speech\\mission\\Tut_3_006.mp3"},
  120.         {"sounds\\game\\speech\\mission\\Tut_3_007.mp3"},
  121.         {"sounds\\game\\speech\\mission\\Tut_3_008.mp3"},
  122.         {""},
  123.         {"sounds\\game\\speech\\mission\\Tut_4_001.mp3"},
  124.         {""},
  125.         {"sounds\\game\\speech\\mission\\Tut_4_002.mp3"},
  126.         {"sounds\\game\\speech\\mission\\Tut_4_003.mp3"},
  127.         {"sounds\\game\\speech\\mission\\Tut_4_004.mp3"},
  128.         {"sounds\\game\\speech\\mission\\Tut_4_005.mp3"},
  129.         {"sounds\\game\\speech\\mission\\Tut_4_006.mp3"},
  130.         {""},
  131.         {"sounds\\game\\speech\\mission\\Tut_5_001.mp3"}
  132. }
  133. new gSpeechCounter = 0; //Ez szamolja, hogy hanyadik dumanal tartunk
  134. //new bool:gFriendly = false; //Friendly fire vizsgaloka
  135. new    gHero[]= "mokus"; //Az officer eppen melyik entitasban van (mokus=onmaga)
  136. new DrID:Comp=DrID:0;        
  137. //new bool:grepcsere=false; //A repzaj amin bejovunk modelljet lecsereljuk nem forgo propellerre
  138. new bool:gindulonemvolt=true; //
  139.  
  140. //**Ezek a nevezetes pontok, ahanyas szamu lepesnel tortenik valami (objective valtas, valami)
  141. const s1 = 3;
  142. const s2 = 14;
  143. const s3 = 16;
  144. const s4 = 21;
  145. const s5 = 23;
  146. const s6 = 29;
  147. const s7 = 31;
  148. const s8 = 39;
  149. const s9 = 41;
  150. const s10 = 47;
  151. const s11 = 49;
  152. //
  153.  
  154.  
  155. //======================================================================================================
  156. public main() // A palya belepesi pontja, helyette a PostGameStart fuggvenyt hasznald
  157.     CommonAKMain();
  158.  
  159.  
  160.  
  161. //======================================================================================================
  162. public PostGameStart()
  163. {
  164.     CommonAKInit();
  165.  
  166.     AddAKEntityEvent( "TovabbDuma", ANY_ENTITY, MESSAGE_END );
  167. //    AddAKEntityEvent( "invasionintro", ANY_ENTITY, TEST_EVENT );
  168.     AddAKEntityEvent( "AreaEntered", ANY_ENTITY, UNIT_AREA_ENTER );
  169.     AddAKEntityEvent( "AreaExit", ANY_ENTITY, UNIT_AREA_EXIT );    
  170.     AddAKEntityEvent( "SomeoneMounted", ANY_ENTITY, UNIT_MOUNTED );
  171.     AddAKEntityEvent( "SomeoneUnMounted", ANY_ENTITY, UNIT_UNMOUNTED );
  172.     AddAKEntityEvent( "DelayDelay", ANY_ENTITY, UNIT_COMMAND_QUEUE_EMPTY);
  173.     AddAKEntityEvent( "TeamChanged", GetEntity("bazis"), HQ_TAKEOVER );
  174.     AddAKEntityEvent( "Intro3", GetEntity("havi2"), UNIT_STOPPED );    
  175.     AddAKEntityEvent( "GroupD", ANY_ENTITY, GROUPDIED );
  176.     AddAKEntityEvent( "FriendlyFire", ANY_ENTITY, WEAPON_SHOT_AT );
  177.     AddAKEntityEvent( "HeroDied", GetEntity("mokus"), UNIT_DIED );
  178.     AddAKEntityEvent( "FriendlyFire2", ANY_ENTITY, UNIT_DIED );
  179.  
  180.     
  181.     AddObjective("P1_Tutorial", OT_PRIMARY, "#iO_TUT_PS01#", "#iO_TUT_PL01#", OS_SLEEPING);    
  182.     AddObjective("P2_Flag", OT_PRIMARY, "#iO_TUT_PS02#", "#iO_TUT_PL02#", OS_SLEEPING);    
  183.     AddObjective("S1", OT_SECONDARY, "#iO_TUT_SS01#", "#iO_TUT_SL01#", OS_SLEEPING);    
  184.     AddObjective("S2", OT_SECONDARY, "#iO_TUT_SS02#", "#iO_TUT_SL02#", OS_SLEEPING);
  185.     AddObjective("S3", OT_SECONDARY, "#iO_TUT_SS03#", "#iO_TUT_SL03#", OS_SLEEPING);
  186.     AddObjective("S4", OT_SECONDARY, "#iO_TUT_SS04#", "#iO_TUT_SL04#", OS_SLEEPING);
  187.     AddObjective("S5", OT_SECONDARY, "#iO_TUT_SS05#", "#iO_TUT_SL05#", OS_SLEEPING);
  188.     AddObjective("Hidden", OT_HIDDEN, "#iO_TUT_HS01#", "#iO_TUT_HL01#", OS_SLEEPING);
  189.  
  190.     Intro();            
  191. /*    ShowTheStats();
  192.     AddAKEntityEvent( "kamera", ANY_ENTITY, TEST_EVENT );*/
  193. }
  194.  
  195.  
  196.  
  197. //======================================================================================================
  198.  
  199. /*public kamera()
  200. {
  201.     ShowTheStats();
  202. }*/
  203.  
  204.  
  205.  
  206. /*public RepCsere(DrID:Area) //Ha a kamera nem mutatja a repulonket, akkor kicsereljuk allo propellerure
  207. {
  208.     new Float:lOjjectPos[vec3];
  209.     GetPropertyVec3( GetEntity("havi3"), "Pos", lOjjectPos );
  210.     if ((!grepcsere)&&(!IsCameraAt( lOjjectPos, 45)))
  211.     {
  212.         CmdMoveToEntity( GetEntity("havi2"), Q_OVERRIDE, GetEntity("al_reconentry1"), MF_TELEPORT );
  213.         ActivateEntity( GetEntity("havi3") );
  214.         SetPropertyBool( GetEntity("havi3"), "HideModel", false );
  215.         SetPropertyBool( GetEntity("havi3"), "Visible", true );
  216.         SetPropertyBool( GetEntity("havi3"), "Invisible", false );
  217.         RefreshFOW();
  218.         grepcsere=true;
  219.         RemoveEvent( "Repcsere" );
  220.     }
  221. }*/
  222.  
  223. public HeroDied() //Ha megpusztult volna a hosunk
  224. {
  225.     BulletTime( GetEntity("mokus"));
  226.     ShowShortMessage( "#iTUT_MSG002#" );
  227.     AddTimerEvent( "GameOver", 2.0, "GameLogic", true);
  228. }
  229.  
  230. public FriendlyFire(DrID:UnitHit, DrID:WhoHit) //Frendlifajor ellenorzo
  231. {
  232.     new team=GetPropertyInt( UnitHit, "Team" )
  233.     new lastteam=GetPropertyInt( UnitHit, "LastTeam" )
  234.     if (((lastteam!=1)&&(IsInSelector( UnitHit, "SelectorTeam2" )||(team==0 )))&& IsInSelector(WhoHit, "SelectorTeam2")&&/*(gFriendly==false)&&*/(WhoHit!=UnitHit))
  235.     {
  236. //    gFriendly=true;
  237.     ShowShortMessage( "#iTUT_MSG001#" );
  238.     BulletTime(UnitHit,false,false,false,10.0,15.0);
  239.     AddTimerEvent( "GameOver", 5.0, "GameLogic", true);
  240.     RemoveEvent( "FriendlyFire" );
  241.     }
  242. }
  243.  
  244. public FriendlyFire2(DrID:WhoDied) //Ha epuletet detonalok akkor is szamitson friendly fire-nek, kiveve a celpont epuleteket
  245. {
  246.     if(IsInstanceOf( WhoDied, GetClassID( "cBuilding" )))
  247.     {
  248. //    if ((WhoDied==("03_bunker1"))||((WhoDied==GetEntity("04_bunker1")))||(WhoDied==GetEntity("misc_build_tent_013"))||(WhoDied==GetEntity("misc_build_tent_012")))
  249.         if ((GetPropertyInt( WhoDied, "Team" ) !=1 )&&(GetPropertyInt( WhoDied, "LastTeam" ) !=1 ))
  250.         {
  251.     //        gFriendly=true;
  252.             BulletTime(WhoDied,false,false,false,10.0,15.0);
  253.             ShowShortMessage( "#iTUT_MSG001#" );
  254.             AddTimerEvent( "GameOver", 5.0, "GameLogic", true);
  255.         }
  256.     }
  257. }
  258.  
  259. //V Az intro es folyomanyai
  260.  
  261. public Intro()
  262. {
  263.     SetCutScene(true,false,true);
  264.     LcvpAnimStop( GetEntity( "us_lcvp1") );
  265.     LcvpAnimStop( GetEntity( "us_lcvp3") );
  266.     LcvpAnimStop( GetEntity( "us_lcvp4") );
  267.     FadeIn(4.0);
  268.     MakeVulnerable(GetEntity("mokus"));
  269.     SetPropertyBool( GetEntity("havi3"), "Visible", false );
  270.     CmdMoveToEntity( GetEntity("havi1"), Q_OVERRIDE, GetEntity("al_support_artillery1"), MF_DIRECT );
  271.     CameraSet(0.0, 56.0, 28.0);
  272.     CameraFollow( GetEntity("havi1") );
  273.     SetPropertyBool( GetEntity("havi2"), "GadgetsVisible", false );
  274.     SetPropertyBool( GetEntity("havi3"), "GadgetsVisible", false );
  275.     ConvoyGo(0,Q_CYCLE,MF_OVERRUN);
  276.     AddTimerEvent( "Intro2", 9.0, "GameLogic", true);
  277.     RemoveEvent( "Intro" );
  278. }
  279.  
  280. public Intro2()
  281. {
  282.     CameraFollow( GetEntity("maszkal1") );
  283.     CmdUnmount( GetEntity("maszkal1"), Q_OVERRIDE );
  284.     CmdMount( GetEntity("maszkal1"),  Q_ENQUEUE, GetEntity("kocsi") );
  285.     PlayAnim(GetEntity("havi2"), "ROTATE", 3.0, PM_LOOP);
  286.      CmdMoveToEntity( GetEntity("havi2"), Q_OVERRIDE, GetEntity("havi_cel"), MF_DIRECT );
  287.     AddTimerEvent( "Intro2esfel", 4.0, "GameLogic", true);
  288.     RemoveEvent( "Intro2" );
  289. }
  290.  
  291. public Intro2esfel()
  292. {
  293.     CameraFollow( GetEntity("kocsi") );
  294.     CmdMoveToEntity( GetEntity("kocsi"), Q_OVERRIDE, GetEntity("kanyar"), MF_OVERRUN );
  295.     CmdMoveToEntity( GetEntity("kocsi"), Q_ENQUEUE, GetEntity("feketeide"), MF_OVERRUN );    
  296.     CmdUnmount( GetEntity("kocsi"), Q_ENQUEUE );
  297.     RemoveEvent( "Intro2esfel" );
  298. }
  299.  
  300. public Intro3()
  301. {
  302.     StopAnim(GetEntity("havi2"), "ROTATE");
  303.     PlayAnim(GetEntity("havi2"), "END ROTATE");
  304.     CmdMoveToEntity( GetEntity("mokus"), Q_OVERRIDE, GetEntity("mokus_cel"), MF_TELEPORT );    
  305.     CmdWait( GetEntity("mokus"), Q_ENQUEUE, 1.0 );
  306.     CmdMoveToEntity( GetEntity("mokus"), Q_ENQUEUE, GetEntity("indulo"), MF_DIRECT );
  307.     AddTimerEvent( "Intro4", 1.0, "GameLogic", true);
  308.     RemoveEvent( "Intro3" );
  309. }
  310.  
  311. public Intro4()
  312. {
  313.     CameraFollow( GetEntity("mokus") );    
  314. //    AddAKEntityEvent( "RepCsere", ANY_ENTITY, AREA_CAMERA_EXITED );
  315.     RemoveEvent( "Intro4" );
  316. }
  317.  
  318. //Intros resz vege.
  319.  
  320. //Ha meghalt a partraszallok groupja, mission failed.
  321. public GroupD()
  322. {
  323.     new GroupName[20];
  324.     GetMsgParamString( GroupName,20 );
  325.     if (!CompareString( GroupName, "land"))
  326.     {
  327.          SetObjectiveState( "P2_Flag", OS_FAILED );
  328.         new DrID:WhoDied = GetLastKilledEntity();
  329.         BulletTime(WhoDied,false,false,false,10.0,15.0);    
  330. //        SetCutScene(true,false,false);
  331.         AddTimerEvent( "GameOver", 1.0, "GameLogic", true);
  332.     }
  333. }
  334.  
  335. //Elfoglaltuk a bazist, mission success
  336. public TeamChanged()
  337. {
  338.     if (IsPlayer( GetEntity("bazis") ))
  339.     {
  340.     SetObjectiveState( "P2_Flag", OS_COMPLETED );
  341.     SetPropertyFloat( GetEntity("bazis"), "Radius", 0.0 );
  342.     AddTimerEvent( "End", 3.0, "GameLogic", true);
  343.     }
  344. }
  345.  
  346. //End sequence, gameoverre ugrik
  347. public End()
  348. {
  349.     SetCutScene(true,true,false);
  350.     BulletTime(GetEntity("bazis"),false,false,false,10.0,15.0);
  351.     AddTimerEvent( "GameOver", 1.0, "GameLogic", true);
  352.     RemoveEvent("End");
  353. }
  354.  
  355. //Legeslegvege
  356. public GameOver()
  357. {    
  358.     if    ((GetObjectiveState( "Hidden" )==OS_SLEEPING)||(GetObjectiveState( "Hidden" )==OS_IN_PROGRESS))
  359.     {
  360.     SetObjectiveState( "Hidden", OS_FAILED );
  361.     }
  362.     
  363.     if (GetObjectiveState( "P2_Flag" )==OS_COMPLETED)
  364.     {
  365.         SetCutScene(true,true,false);
  366.         EndMission( MS_ACCOMPLISHED );
  367.     }
  368.     else
  369.     {
  370.         if (GetObjectiveState( "P2_Flag" )==OS_IN_PROGRESS)
  371.         {
  372.         SetObjectiveState( "P2_Flag", OS_FAILED );
  373.         }
  374.         if (GetObjectiveState( "P1_Tutorial" )==OS_IN_PROGRESS)
  375.         {
  376.         SetObjectiveState( "P1_Tutorial", OS_FAILED );
  377.         }
  378.         SetCutScene(true,true,false);
  379.         EndMission( MS_FAILED );
  380.     }
  381.     RemoveEvent( "GameOver" );
  382. }
  383.  
  384. public TovabbDuma() //Ez az a rettenetes eljaras ami tovabb lepteti a tomboket, es elhallgattatja az eddig szolo dumat
  385. {
  386.     ClearSoundMessages();
  387.     gSpeechCounter++;
  388.     KameraMozgatas(gSpeechCounter);
  389.     NextMsg();
  390. }
  391.  
  392. public KameraMozgatas(speech)
  393.     switch(speech)
  394.     {
  395.     case 42:
  396.         {    
  397.             CamPosStore();
  398.             SetCameraRotSpeed(7.0);
  399.             SetCameraSpeed(12.0);
  400.             CameraSet(-35.0, 59.0, 17.0, false);
  401.             MoveCameraToEnt(GetEntity("al_engineer5") );
  402.         }
  403.     case 43:
  404.         {
  405.             SetCameraTargetPos(Float:{222.0,100.0,1.0} );
  406.             CameraSet(90.0, 58.0, 15.0, false);
  407.         }
  408.     case 44:
  409.         {
  410.             SetCameraTargetPos(Float:{242.0,94.0,1.0} );
  411.             CameraSet(-60.0, 58.0, 15.0, false);
  412.         }
  413.     case 45:
  414.         {
  415.             SetCameraTargetPos(Float:{224.0,88.0,1.0});
  416.             CameraSet(177.0, 58.0, 20.0, false);
  417.         }
  418.         
  419.     case 46:
  420.     {
  421.         CamPosRestore();
  422.         CameraSpeed(-1.0,-1.0,-1.0,-1.0);
  423.     }    
  424.     }
  425. }
  426.  
  427. stock bool:HeroIdle() //Nem mozog-e eppen a hos fuggveny
  428. {
  429.     if (IsMounted( GetEntity("mokus") ))
  430.     {
  431.     Comp=(GetComponent( GetEntity(gHero), "cUnitCommandExecutor"));    
  432.     }
  433.     else
  434.     {
  435.     Comp=(GetComponent( GetEntity("mokus"), "cUnitCommandExecutor"));
  436.     }
  437.     if (GetPropArrayLength( Comp, "Queue")==0)
  438.     {
  439.         return true;
  440.     }
  441.     return false;
  442. }
  443.  
  444. public NextMsg() //Ez a fergeteges resz mondatja ki a kovetkezo dumat 
  445. {
  446.     ObjectiveWatch()
  447.     if (strlen(gSoundID[gSpeechCounter])==0)
  448.         {
  449.         Control();
  450.         }
  451.     if (((gSpeechCounter<=52) && (strlen(gSoundID[gSpeechCounter])!=0)) )
  452.     {
  453.  
  454.         AddSoundMessage(gSpeechID[gSpeechCounter], gSoundID[gSpeechCounter], true);
  455.     }
  456. }
  457.  
  458. public MakeMountIn() //Hogyha az elejen a juzer nem csinal semmit, akkor ez szallitja be a kocsiba es viszi a hazba
  459. {
  460.     if ((IsInSelector( GetEntity("mokus"), "Indulo" ))&&(HeroIdle()) )
  461.     {
  462.     RemoveFromGroup( "Indulo", GetEntity("mokus"));
  463.     SetCutScene(true,false,false); 
  464.     CmdMount( GetEntity("mokus"), Q_URGENT, GetEntity("taliga") );
  465.     CmdMount( GetEntity("mokus"), Q_CYCLE, GetEntity("hq") );
  466.     CmdMoveToEntity ( GetEntity("taliga"), Q_CYCLE, GetEntity("hq_wp"), _ );
  467.     CameraFollow( GetEntity("taliga") );
  468.     CmdStop( GetEntity("taliga"), Q_ENQUEUE );
  469.     CmdUnmount( GetEntity("taliga"), Q_ENQUEUE );    
  470.     AddTimerEvent( "GoIn", 1.0, "GameLogic", true);
  471.     RemoveEvent( "MakeMountIn" );
  472.     }
  473. }
  474.  
  475. public GoIn() //Valojaban ez viszi be a hazba a ksifickot, ha kimountolt a kocsibol vagy mi...
  476. {
  477.     CmdMount( GetEntity("mokus"), Q_ENQUEUE, GetEntity("hq") );
  478. }
  479.  
  480. public DelayDelay(DrID:Who) //Ez valami keslelteto
  481. {
  482.  
  483.     if (Who==GetEntity(gHero))
  484.     {
  485.     AddTimerEvent( "Delay", 5.0, "GameLogic", true);
  486.     }
  487. }
  488.  
  489. public Delay() //Ezek azt hiszem amikor szunet kell a dumaba
  490. {
  491.     if ((gSpeechCounter==s3) && (HeroIdle()))
  492.     {
  493.     TovabbDuma();
  494.     }
  495.     if ((gSpeechCounter==s5) && (HeroIdle()))
  496.     {
  497.     TovabbDuma();
  498.     }
  499.     if ((gSpeechCounter==s7) && (HeroIdle()))
  500.     {
  501.     TovabbDuma();
  502.     }
  503.     if ((gSpeechCounter==s9) && (HeroIdle()))
  504.     {
  505.     TovabbDuma();
  506.     }
  507.     RemoveEvent( "Delay" );
  508. }
  509.  
  510. public Control()
  511. {
  512.     if (gSpeechCounter==s1)
  513.     {
  514.         AddTimerEvent( "MakeMountIn", 5.0, "GameLogic", true);
  515.     }
  516.     if (gSpeechCounter==s2)
  517.     {
  518.         CmdUnmount( GetEntity("mokus"), Q_URGENT );
  519.  
  520.     }
  521.     if (gSpeechCounter==s3)
  522.     {
  523.         AddTimerEvent( "Delay", 5.0, "GameLogic", true);
  524. //d        ShowShortMessage( "Var, hogy elmegyek-e piroshoz" );
  525.     }
  526.     if (gSpeechCounter==s4)
  527.     {
  528. //d        ShowShortMessage( "piros areaba lepesre var" );
  529.     }
  530.     if (gSpeechCounter==s5)
  531.     {
  532.         AddTimerEvent( "Delay", 5.0, "GameLogic", true);
  533. //d        ShowShortMessage( "Var, hogy elmegyek-e zoldhoz" );
  534.     }
  535.     if (gSpeechCounter==s6)
  536.     {
  537. //d        ShowShortMessage( "zold areaba lepesre var" );
  538.     }
  539.     if (gSpeechCounter==s7)
  540.     {
  541.         AddTimerEvent( "Delay", 5.0, "GameLogic", true);
  542. //d        ShowShortMessage( "var, hogy elmegyek-e kekhez" );
  543.     }
  544.     if (gSpeechCounter==s8)
  545.     {
  546. //d        ShowShortMessage( "kek areaba lepesre var" );
  547.     }
  548.     if (gSpeechCounter==s9)
  549.     {
  550.         AddTimerEvent( "Delay", 5.0, "GameLogic", true);
  551. //d        ShowShortMessage( "var, hogy elmegyek-e sargahoz" );
  552.     }
  553.     if (gSpeechCounter==s10)
  554.     {
  555. //d        ShowShortMessage( "sarga areaba lepesre var" );
  556.     }
  557. }
  558.  
  559. public SomeoneMounted( DrID:UndWho, DrID:UndWhere )
  560. {
  561.     new DrID:HeroBacsi = GetEntity( gHero );
  562.     new DrID:House = GetEntity( "hq" );
  563.  
  564.     //Ha az officer bemountol valahova, leszedi a szelekciot rola. Volt egy bug, hogy minden areaba lepeskor valamiert megint kiszelektalodott a jarmu belsejeben
  565.     if     ((UndWho == HeroBacsi)) 
  566.     {
  567.     RemoveFromGroup( "Selection", HeroBacsi );
  568.     }
  569.     //Hidden teljesitese, ha a radio towerbe mountolunk    
  570.     if     ((UndWho == HeroBacsi) && (UndWhere==GetEntity("tut_radiotower1"))&&(GetObjectiveState( "Hidden" )==OS_SLEEPING) )
  571.     {
  572.     SetObjectiveState( "Hidden", OS_COMPLETED );
  573.     }
  574.     //Ha bemountolunk valahova, a gHero a jarmu StringID-jat kapja
  575.     if     ((UndWho == HeroBacsi) && (IsInstanceOf( UndWhere, GetClassID("cVehicle"))))
  576.     {
  577.         GetPropertyString( UndWhere, "StringID", 40, gHero );
  578.     }
  579.     //Ha a HQ-ba mountolunk, akkor elkezd dumalni, plusz mikor automatikusan montolunk bele, bevegzi a cutscenet
  580.     if  ((UndWhere == House) && (UndWho == HeroBacsi))
  581.     {
  582.         RemoveEvent( "GoIn" );
  583.         CameraFollow( DrID:0 );
  584.         SetCutScene(false,false,false);
  585.         gSpeechCounter=s1;
  586.         TovabbDuma();
  587.     }
  588. }
  589.  
  590. public SomeoneUnMounted( DrID:UndWho, DrID:UndFromWhere )
  591. {
  592.     new DrID:KocsiBacsi = GetEntity( "maszkal1" );
  593.     new DrID:HeroBacsi = GetEntity( "mokus" );
  594.     new DrID:House = GetEntity( "hq" );
  595.     
  596.     //Ez eltunteti a kiscsakot aki az introban vezeti a fekete autot
  597.     if     ((UndWho == KocsiBacsi)&&(UndFromWhere==GetEntity("kocsi")))
  598.     {
  599.         CmdMoveToEntity( (KocsiBacsi), Q_OVERRIDE, GetEntity("al_airstrikeentry1"), MF_TELEPORT );
  600.     }
  601.     //Ha kimountolunk, a gHero megint mokus lesz.
  602.     if     (UndWho == HeroBacsi)
  603.     {
  604.         gHero="mokus";
  605.     }
  606.     //A HQ-bol kimountolva jon a kovetkezo resz
  607.     if  ((UndFromWhere == House) && (UndWho == HeroBacsi))
  608.     {
  609.         gSpeechCounter=s2;
  610.         TovabbDuma();        
  611.     }
  612.     //Az LCI-bol kimountolnak a partraszallo kiscsakok, es a waypointokhoz robognak
  613.     if  (IsInSelector( UndFromWhere, "LCI" ))
  614.     {
  615.         if (UndFromWhere==GetEntity("us_lcvp1"))
  616.         {
  617.             CmdMoveToEntity( UndWho, Q_ENQUEUE, GetEntity("wpb1"), MF_DIRECT );
  618.         }
  619. /*        if (UndFromWhere==GetEntity("us_lcvp2"))
  620.         {
  621.             CmdMoveToEntity( UndWho, Q_ENQUEUE, GetEntity("wpb2"), MF_DIRECT );
  622.         }
  623. */        
  624.         if (UndFromWhere==GetEntity("us_lcvp3"))
  625.         {
  626.             CmdMoveToEntity( UndWho, Q_ENQUEUE, GetEntity("wpb3"), MF_DIRECT );
  627.         }
  628.         if (UndFromWhere==GetEntity("us_lcvp4"))
  629.         {
  630.             CmdMoveToEntity( UndWho, Q_ENQUEUE, GetEntity("wpb4"), MF_DIRECT );
  631.         }        
  632.     }
  633. }
  634.  
  635. public AreaEntered(DrID:WhoEntered, DrID:AreaID)
  636. {
  637.  
  638.     if ((AreaID==GetEntity("part_main"))&&(IsInSelector( WhoEntered, "Ssima" )))//A DDSHERMAN vizi uzemmodba valt
  639.     {
  640.         PlayAnim(WhoEntered, "CANVAS_UP");
  641.         ShipMode(WhoEntered, true);
  642.     }
  643.     if ((AreaID==GetEntity("part_sziget"))&&(IsInSelector( WhoEntered, "Ssima" )))//A DDSHERMAN szarazfoldi uzemmodba valt
  644.     {
  645.         PlayAnim(WhoEntered, "CANVAS_DOWN");
  646.         ShipMode(WhoEntered, false);        
  647.     }
  648.     if ((AreaID==GetEntity("kussz"))&&(IsInSelector( WhoEntered, "trening" )))//kuszas
  649.     {
  650.         CmdSetMS( WhoEntered, Q_URGENT, MS_CRAWL );
  651.     }
  652.     if ((WhoEntered==GetEntity("havi2")) && (AreaID==GetEntity("havibe") )) //intro3
  653.     {
  654.         CameraFollow( GetEntity("havi2"));
  655.         CameraSet(-20.0, 56.0, 28.0);
  656.     }
  657.  
  658.     if ((WhoEntered==GetEntity("havi2")) && (AreaID==GetEntity("havi_effekt1") )) //intro3
  659.     {
  660.         StopAnim(GetEntity("havi2"), "ROTATE");
  661.         PlayAnim(GetEntity("havi2"), "ROTATE", 2.4, PM_LOOP);
  662.     }
  663.  
  664.     if ((WhoEntered==GetEntity("havi2")) && (AreaID==GetEntity("havi_effekt2") )) //intro3
  665.     {
  666.         StopAnim(GetEntity("havi2"), "ROTATE");
  667.         PlayAnim(GetEntity("havi2"), "ROTATE", 1.7, PM_LOOP);
  668.     }
  669.  
  670.     if ((WhoEntered==GetEntity("havi2")) && (AreaID==GetEntity("havi_effekt3") )) //intro3
  671.     {
  672.         StopAnim(GetEntity("havi2"), "ROTATE");
  673.         PlayAnim(GetEntity("havi2"), "ROTATE", 1.0, PM_LOOP);
  674.     }
  675.  
  676.     if ((WhoEntered==GetEntity("kocsi")) && (AreaID==GetEntity("sys_rectarea1") )) //intro3
  677.         {
  678.         ShowShortMessage( "#b##b##d##c255,200,0##ac#You find a paper with an old writing:");
  679.         ShowShortMessage( "#d##c235,0,0##ac#IT's under the church in St. Mere!");
  680.         }
  681.  
  682.  
  683.     if ((WhoEntered==GetEntity("mokus")) && (AreaID==GetEntity("indulo") )) //intro4
  684.         {
  685.         if (gindulonemvolt)
  686.         {
  687.             CameraFollow( DrID:0 );
  688.             MoveCameraToEnt( GetEntity("indulo") );
  689.             SetCutScene(false,false,false);
  690.             AddToGroup( "Selection", GetEntity("mokus"));
  691.             AddToGroup( "Indulo", GetEntity("mokus"));
  692.             NextMsg();
  693.             gindulonemvolt=false;
  694.         }
  695.         }
  696.     //belelep areaba, akkor az odavago duma kezdodik
  697.     if ((WhoEntered==GetEntity("mokus")) && (!IsInSelector( GetEntity("mokus"), "Garea_red" ))&&(!IsInSelector( GetEntity("mokus"), "Garea_green" ))&&(!IsInSelector( GetEntity("mokus"), "Garea_blue" ))&&(!IsInSelector( GetEntity("mokus"), "Garea_yellow" )))
  698.     {
  699.         if (AreaID==GetEntity("area_red"))
  700.         {
  701. //d        ShowShortMessage( "piros" );
  702.         AddToGroup( "Garea_red", GetEntity("mokus") );
  703.         gSpeechCounter=s4;
  704.         TovabbDuma();
  705.         }
  706.         if (AreaID==GetEntity("area_green"))
  707.         {
  708.         AddToGroup( "Garea_green", GetEntity("mokus") );
  709. //d        ShowShortMessage( "zold" );
  710.         gSpeechCounter=s6;
  711.         TovabbDuma();
  712.         }
  713.         if (AreaID==GetEntity("area_blue"))
  714.         {
  715.         AddToGroup( "Garea_blue", GetEntity("mokus") );
  716. //d        ShowShortMessage( "kek" );
  717.         gSpeechCounter=s8;
  718.         TovabbDuma();
  719.         }
  720.         if (AreaID==GetEntity("area_yellow"))
  721.         {
  722.         AddToGroup( "Garea_yellow", GetEntity("mokus") );
  723. //d        ShowShortMessage( "sarga" );
  724.         gSpeechCounter=s10;
  725.         TovabbDuma();
  726.         }
  727.     }
  728.     //megerkeznek a partraszallo hajok, leallnak, es kinyilik az ajto.
  729.  
  730.     if ((IsInSelector(  WhoEntered, "LCI" ))&& (AreaID==GetEntity("part_sziget")))
  731.     {
  732.         CmdStop( WhoEntered, Q_URGENT );
  733.         CmdWait( WhoEntered, Q_ENQUEUE, 0.4);
  734.         PlayAnim((WhoEntered), "OPEN");
  735.         CmdUnmount( WhoEntered, Q_ENQUEUE, UMTF_UNMOUNT_ALL );
  736.         MakeNOTMountable(WhoEntered);
  737.     }
  738.  
  739.     if ((IsInSelector( WhoEntered, "LCI" ))&& (AreaID==GetEntity("effektki")))
  740.     {
  741.         LcvpAnimStop( WhoEntered );
  742.     }
  743.  
  744.     //Ez itt a partraszallo anim vegenek vezerlese
  745.     if (WhoEntered==GetEntity("al_engineer10")&& (AreaID==GetEntity("part_sziget") ))
  746.     {
  747.          MakeVulnerable(GetEntity("al_engineer10"));
  748.          SetCutScene(false,false,false);
  749.         CameraFollow( DrID:0 );
  750.         MakeVulnerable(GetEntity("mokus"));
  751.     }
  752.  
  753.     if (IsInSelector( WhoEntered, "Ssima" )&& (AreaID==GetEntity("part_sziget") ))
  754.     {
  755.         MakeSelectable(GetEntity("al_m4 sherman_dd2"));
  756.          MakeSelectable(GetEntity("al_m4 sherman_dd1"));
  757.          MakeSelectable(GetEntity("al_m4 sherman_dd3"));
  758.     }
  759.  
  760.     if ((IsInSelector( WhoEntered, "LCI" ))&& (AreaID==GetEntity("effektbe")))
  761.     {
  762.         LcvpAnimPlay( WhoEntered );
  763.     }
  764.  
  765.     if ((IsInSelector( WhoEntered, "egy" ))&& (AreaID==GetEntity("area_egy")))
  766.     {
  767.     CmdGroupMoveToEnt( "egy", GetEntity("hely1"), Q_OVERRIDE, MF_OVERRUN );
  768.     CmdSetMS( WhoEntered, Q_ENQUEUE, MS_CRAWL );
  769.     RemoveFromGroup( "egy", WhoEntered );
  770.     }
  771.     if ((IsInSelector( WhoEntered, "ketto" ))&& (AreaID==GetEntity("area_ketto")))
  772.     {
  773.     CmdGroupMoveToEnt( "ketto", GetEntity("hely2"), Q_OVERRIDE, MF_OVERRUN );
  774.     CmdSetMS( WhoEntered, Q_ENQUEUE, MS_CRAWL );
  775.     RemoveFromGroup( "ketto", WhoEntered );
  776.     }
  777.     if ((IsInSelector( WhoEntered, "harom" ))&& (AreaID==GetEntity("area_harom")))
  778.     {
  779.     CmdGroupMoveToEnt( "harom", GetEntity("hely3"), Q_OVERRIDE, MF_OVERRUN );
  780.     CmdSetMS( WhoEntered, Q_ENQUEUE, MS_CRAWL );
  781.     RemoveFromGroup( "harom", WhoEntered );
  782.     }
  783.     if ((IsInSelector( WhoEntered, "negy" ))&& (AreaID==GetEntity("area_negy")))
  784.     {
  785.     CmdGroupMoveToEnt( "negy", GetEntity("hely4"), Q_OVERRIDE, MF_OVERRUN );
  786.     CmdSetMS( WhoEntered, Q_ENQUEUE, MS_CRAWL );
  787.     RemoveFromGroup( "negy", WhoEntered );
  788.     }
  789. }
  790.  
  791. public AreaExit(DrID:WhoExited, DrID:AreaID)
  792. {
  793.     if ((AreaID==GetEntity("kussz"))&&(IsInSelector( WhoExited, "trening" )))//kuszasbol felall
  794.     {
  795.         CmdSetMS( WhoExited, Q_URGENT, MS_RUN );
  796.     }
  797.     //Ha kilepkedunk areakbol, akkor mi legyen
  798.     if (WhoExited==GetEntity("mokus"))
  799.     {
  800.         if ((AreaID==GetEntity("area_red"))&&((!IsInSelector( GetEntity("mokus"), "Garea_blue"))&&(!IsInSelector( GetEntity("mokus"), "Garea_green"))&&(!IsInSelector( GetEntity("mokus"), "Garea_yellow"))))
  801.         {
  802.         RemoveFromGroup( "Garea_red", GetEntity("mokus") );
  803.         gSpeechCounter=s6-1;
  804.         TovabbDuma();
  805.         }
  806.         if ((AreaID==GetEntity("area_yellow"))&&((!IsInSelector( GetEntity("mokus"), "Garea_blue"))&&(!IsInSelector( GetEntity("mokus"), "Garea_green"))&&(!IsInSelector( GetEntity("mokus"), "Garea_red"))))
  807.         {
  808.         RemoveFromGroup( "Garea_yellow", GetEntity("mokus") );
  809.         gSpeechCounter=53;
  810.         TovabbDuma();
  811.         }
  812.         if ((AreaID==GetEntity("area_green"))&&((!IsInSelector( GetEntity("mokus"), "Garea_blue"))&&(!IsInSelector( GetEntity("mokus"), "Garea_yellow"))&&(!IsInSelector( GetEntity("mokus"), "Garea_red"))))
  813.         {
  814.         RemoveFromGroup( "Garea_green", GetEntity("mokus") );
  815.         gSpeechCounter=s8-1;
  816.         TovabbDuma();
  817.         }
  818.         if ((AreaID==GetEntity("area_blue"))&&((!IsInSelector( GetEntity("mokus"), "Garea_green"))&&(!IsInSelector( GetEntity("mokus"), "Garea_yellow"))&&(!IsInSelector( GetEntity("mokus"), "Garea_red"))))
  819.         {
  820.         RemoveFromGroup( "Garea_blue", GetEntity("mokus") );
  821.         gSpeechCounter=s10-1;
  822.         TovabbDuma();
  823.         }
  824.         if (IsInSelector( GetEntity("mokus"), "Indulo" ))
  825.         {
  826.         RemoveFromGroup( "Indulo", GetEntity("mokus"));
  827.         }
  828.     }
  829. }
  830.  
  831. public invasionintro() //Ez itt lenni mindenfele partraszallos cuccos.
  832. {
  833.     CmdStop( GetEntity("mokus"), Q_OVERRIDE );
  834.     RemoveFromGroup( "Selection", GetEntity("mokus"));
  835.     SetPropertyBool( GetEntity("mokus"), "ControlDisabled", true );
  836.     SetCutScene(true,false,false);
  837.     SetCameraTargetDistance( 44.2 );
  838.     SetCameraTargetRotate(25.0);
  839.     SetCameraTargetPitch(60.0);
  840.     CameraFollow( GetEntity("al_engineer10") );
  841.     CmdWait( GetEntity("us_lcvp3"), Q_OVERRIDE, 2.0 );
  842.     CmdWait( GetEntity("us_lcvp4"), Q_OVERRIDE, 3.0 );
  843.     CmdMoveToEntity( GetEntity("us_lcvp1"), Q_OVERRIDE, GetEntity("wpr1"), MF_DIRECT );
  844.     CmdMoveToEntity( GetEntity("us_lcvp3"), Q_ENQUEUE, GetEntity("wpr3"), MF_DIRECT );
  845.     CmdMoveToEntity( GetEntity("us_lcvp4"), Q_ENQUEUE, GetEntity("wpr4"), MF_DIRECT );
  846.     CmdWait( GetEntity("al_m4 sherman_dd2"), Q_OVERRIDE, 0.5 );
  847.     CmdWait( GetEntity("al_m4 sherman_dd1"), Q_OVERRIDE, 10.0 );
  848.     CmdWait( GetEntity("al_m4 sherman_dd3"), Q_OVERRIDE, 7.0 );
  849.     CmdMoveToEntity( GetEntity("al_m4 sherman_dd2"), Q_ENQUEUE, GetEntity("tankoknak1"), MF_DIRECT );
  850.     CmdAttack( GetEntity("al_m4 sherman_dd2"), Q_ENQUEUE, GetEntity("ax_pziiiflame1") );    
  851.     CmdMoveToEntity( GetEntity("al_m4 sherman_dd1"), Q_ENQUEUE, GetEntity("tankoknak2"), MF_DIRECT );
  852.     CmdMoveToEntity( GetEntity("al_m4 sherman_dd3"), Q_ENQUEUE, GetEntity("tankoknak3"), MF_DIRECT );
  853.     SetAirStrike(2,1);
  854.     SetAirRecon(2,1);
  855.     SetArtilleryAttack(2,1);
  856.     SetPropertyBool( GetEntity("bazis"), "VisibleOnMiniMap", true );
  857. //    SetParatroopers(2,1);
  858.     RemoveEvent( "invasionintro" );
  859. }
  860.  
  861. public LcvpAnimPlay(DrID:Who)
  862. {
  863.     SetPropertyBool( GetComponent( Who , "cEffectController"), "PermanentEffectEnabled", true );
  864. }
  865.  
  866. public LcvpAnimStop(DrID:Who)
  867. {
  868.     SetPropertyBool( GetComponent( Who , "cEffectController"), "PermanentEffectEnabled", false );
  869. }
  870.  
  871. public ObjectiveWatch()
  872. {
  873.     switch (gSpeechCounter)
  874.     {
  875.     case 0:
  876.     {
  877.         SetObjectiveState( "P1_Tutorial", OS_IN_PROGRESS );
  878.     }
  879.     case s1:
  880.     {
  881.         if (GetObjectiveState( "S1" )==OS_SLEEPING)
  882.         {
  883.         SetObjectiveState( "S1", OS_IN_PROGRESS );
  884.         }
  885.     }
  886.     case s1+1:
  887.     {
  888.         if (GetObjectiveState( "S1" )==OS_SLEEPING)
  889.         {
  890.         SetObjectiveState( "S1", OS_IN_PROGRESS );
  891.         }
  892.     }
  893.     case s2:
  894.     {
  895.         if (GetObjectiveState( "S1" )==OS_IN_PROGRESS)
  896.         {
  897.             SetObjectiveState( "S1", OS_COMPLETED );
  898.         }
  899.     }
  900.     case s3:
  901.     {
  902.         if (GetObjectiveState( "S2" )==OS_SLEEPING)
  903.         {
  904.         SetObjectiveState( "S2", OS_IN_PROGRESS );
  905.         }
  906.     }
  907.     case s3+1:
  908.     {
  909.         if (GetObjectiveState( "S2" )==OS_SLEEPING)
  910.         {
  911.         SetObjectiveState( "S2", OS_IN_PROGRESS );
  912.         }
  913.     }
  914.     case s4:
  915.     {
  916.         if (GetObjectiveState( "S2" )==OS_IN_PROGRESS)
  917.         {
  918.             SetObjectiveState( "S2", OS_COMPLETED );
  919.         }
  920.     }
  921.     case s5:
  922.     {
  923.         if (GetObjectiveState( "S3" )==OS_IN_PROGRESS)
  924.         {}
  925.         else SetObjectiveState( "S3", OS_IN_PROGRESS );
  926.     }
  927.     case s5+1:
  928.     {
  929.         if (GetObjectiveState( "S3" )==OS_IN_PROGRESS)
  930.         {}
  931.         else SetObjectiveState( "S3", OS_IN_PROGRESS );
  932.     }
  933.     case s6:
  934.     {
  935.         if (GetObjectiveState( "S3" )==OS_IN_PROGRESS)
  936.         {
  937.             SetObjectiveState( "S3", OS_COMPLETED );
  938.         }
  939.     }
  940.     case s7:
  941.     {
  942.         if (GetObjectiveState( "S4" )==OS_IN_PROGRESS)
  943.         {}
  944.         else SetObjectiveState( "S4", OS_IN_PROGRESS );
  945.     }
  946.     case s7+1:
  947.     {
  948.         if (GetObjectiveState( "S4" )==OS_IN_PROGRESS)
  949.         {}
  950.         else SetObjectiveState( "S4", OS_IN_PROGRESS );
  951.     }
  952.     case s8:
  953.     {
  954.         if (GetObjectiveState( "S4" )==OS_IN_PROGRESS)
  955.         {
  956.             SetObjectiveState( "S4", OS_COMPLETED );
  957.         }
  958.     }
  959.     case s9:
  960.     {
  961.         if (GetObjectiveState( "S5" )==OS_IN_PROGRESS)
  962.         {}
  963.         else SetObjectiveState( "S5", OS_IN_PROGRESS );
  964.     }
  965.     case s9+1:
  966.     {
  967.         if (GetObjectiveState( "S5" )==OS_IN_PROGRESS)
  968.         {}
  969.         else SetObjectiveState( "S5", OS_IN_PROGRESS );
  970.     }
  971.     case s10:
  972.     {
  973.         if (GetObjectiveState( "S5" )==OS_IN_PROGRESS)
  974.         {
  975.             SetObjectiveState( "S5", OS_COMPLETED );
  976.         }
  977.     }
  978.     case s11:
  979.     {
  980.         if ((GetObjectiveState( "S1" )==OS_COMPLETED)&&
  981.             (GetObjectiveState( "S2" )==OS_COMPLETED)&&
  982.             (GetObjectiveState( "S3" )==OS_COMPLETED)&&
  983.             (GetObjectiveState( "S4" )==OS_COMPLETED)&&
  984.             (GetObjectiveState( "S5" )==OS_COMPLETED)&&
  985.             (SetObjectiveState( "P1_Tutorial", OS_IN_PROGRESS)))
  986.         {
  987.             SetObjectiveState( "P1_Tutorial", OS_COMPLETED );
  988.         }
  989.         else
  990.         {
  991.             SetObjectiveState( "P1_Tutorial", OS_CANCELLED );        
  992.         }
  993.         AddTimerEvent( "invasionintro", 5.0, "GameLogic", true);
  994.         SetObjectiveState( "P2_Flag", OS_IN_PROGRESS );
  995.     }
  996.     }
  997. }
  998.  
  999.  
  1000. //======================================================================================================
  1001. // Add your functions here:
  1002.  
  1003.  
  1004.  
  1005.  
  1006. //======================================================================================================
  1007. public ObjectiveChanged()
  1008. {
  1009.     // Check objectives here
  1010. }
  1011.