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

  1. // TUNING PARAMETERS:
  2. // Here comes the parameters, which need fine tuning.
  3. // new iMS11_SP001A[]="US Tank Commander: Seems like the Germans are regrouping nearby ... they almost had us.";
  4. // new iMS11_SP001B[]="US Officer: Don't worry. A plane is already sent out to scout the area.";
  5. // new iMS11_SP001C[]="US Pilot: The town is quiet. Seems like the Krauts aren't attacking yet.";
  6. // new iMS11_SP001D[]="US Pilot: What the hell's going on around here?";
  7. // new iMS11_SP001E[]="US Pilot: I'm hit!";
  8. // new iMS11_SP002A[]="US Pilot: Thank you, my friends! I owe you one!";
  9. // new iMS11_SP002B[]="US Soldier: Let's get back to the HQ at the town. You'll be safe there, Private!";
  10. // new iMS11_SP002C[]="US Pilot: *coughs* In fact I am actually a Wing Commander."
  11. // new iMS11_SP002D[]="US Soldier: My apologies, Sir! But we still got to hurry up!";
  12. // new iMS11_SP002E[]="US Pilot: No problem. Let's go to that HQ!";
  13. // new iMS11_SP003A[]="US Pilot: I am heading back to my Headquarters. Thank you again, fellows. I really owe you that one.";
  14. // new iMS11_SP004A[]="US Soldier: Our bridge ... They blew it up!";
  15. // new iMS11_SP005A[]="US Soldier: Look! The Big Tank is retreating!";
  16.  
  17. //new gTempWav[]="Sounds\\Game\\Speech\\Mission\\TEMPORARY.wav";
  18.  
  19. // TODO: ===============================================================================================
  20. // Write here tasks to be done.
  21.  
  22.  
  23. // DECLARATIONS: =======================================================================================
  24. #include "script.inc"
  25. #include antiair.inc
  26. // Write here global variable declarations and definitions. All globals should start with letter: 'g'!
  27.  
  28.  
  29. new gPilotName[66];
  30. new bool:gPilotResced=false;
  31. new Float:gWessideReinf=350.0;
  32. new Float:gEassideReinf=460.0;
  33. new Float:gInduljPilotert=666.666;
  34. new Float:gEngineerAttack=456.789;
  35. new bool:gElozopalya=false;
  36.  
  37. new gReinfNo=0;
  38. //======================================================================================================
  39. public main() // A palya belepesi pontja, helyette a PostGameStart fuggvenyt hasznald
  40.     CommonAKMain();
  41.  
  42. //======================================================================================================
  43. public PostGameStart()
  44. {
  45. // Some must have stuff:
  46.     CommonAKInit();
  47.  
  48. // Add objectives:
  49.     // Add objective related events:
  50.     SetLvBehSentProp(123, true);
  51.     switch(GetDifficulty())
  52.     {
  53.         case 0:SetReinfNo(15);
  54.         case 1:SetReinfNo(10);
  55.         case 2:SetReinfNo(5);
  56.         case 3:SetReinfNo(3);
  57.     }
  58.     AddUserEvent( "TeamElimSucceed", UE_TEAMELIM_SUCC );
  59.     // AddUserEvent( "GroupSurviveFailed", UE_GROUP_SURV_FAIL );
  60.     AddUserEvent( "ObjectiveChanged", UE_OBJECTIVE_CHANGED );
  61.  
  62.     // Additional Mission Objective:
  63.     StartIntro();
  64. // Start doing some things:
  65.     AddAKEntityEvent( "SomeEntered", ANY_ENTITY, UNIT_AREA_ENTER );
  66.     AddAKEntityEvent( "SomeExited", ANY_ENTITY, UNIT_AREA_EXIT );
  67.     AddAKEntityEvent( "SomeHQCaptured", ANY_ENTITY, "cHQ,00" );
  68.     AddAKEntityEvent( "SomeMounted", ANY_ENTITY, UNIT_MOUNTED );
  69.     AddAKEntityEvent( "SomeTeamChanged", ANY_ENTITY, UNIT_TEAM_CHANGED );
  70.  
  71.     AddAKEntityEvent( "BridgeDied", GetEntity( "westbridge" ), UNIT_DIED );
  72.     AddAKEntityEvent( "BridgeDied", GetEntity( "eastbridge" ), UNIT_DIED );
  73.  
  74.     AddAKEntityEvent( "ShowReinfNo", ANY_ENTITY, "cReinforcementSystem,00" );
  75.  
  76.     HackAntiAirInit();
  77.     AddTimerEvent( "YouReDaRealNigger", 1.0 );
  78.     gElozopalya=(GetGlobalVariable("gvMS10_Elifrit")==1);
  79. }
  80.  
  81. public ShowReinfNo()
  82. {
  83.     new DaTeam=GetMsgParamInt();
  84. //    ShowShortMessageP1( "Reinf / DaTeam %d", DaTeam );
  85.     if(DaTeam==gPlayerTeam)            
  86.     {
  87.         gReinfNo++;
  88.         ReinfKiir();
  89.     }
  90. }
  91.  
  92. public ReinfKiir()
  93. {
  94.     new DrID:ReinfSys=GetPropertyObject( GetWorld(), "ReinforcementSystem");
  95.     new ReinfMax=GetPropertyInt( ReinfSys, "MultiReinforcementCount" );
  96.     new Kiirando[166];
  97.     if((ReinfMax-gReinfNo)<1)
  98.     {
  99.         SetShortInfo("#cred##d##iMS11_MSG001A#");
  100.         SetLvBehSentProp(123, false);
  101.         return;
  102.     }
  103.     Int2Str( (ReinfMax-gReinfNo), Kiirando, 10, "" );
  104.     ConcatString( Kiirando, 166, "#iMS11_MSG001B#", Kiirando );
  105.     if((ReinfMax-gReinfNo)<2)
  106.     {
  107.         Kiirando="#cred##d##iMS11_MSG001C#";        
  108.     }
  109.     SetShortInfo(Kiirando);    
  110. }
  111.  
  112. public SetReinfNo(Hanyra)
  113. {
  114.     new DrID:ReinfSys=GetPropertyObject( GetWorld(), "ReinforcementSystem");
  115.     SetPropertyInt( ReinfSys, "MultiReinforcementCount",Hanyra );
  116.     ReinfKiir();
  117. }
  118.  
  119. public ShowTheStatz()
  120. {
  121.     ShowShortMessage( "TEST EVENTA!" );
  122.     ShowTheStats();
  123. }
  124.  
  125. public SomeTeamChanged(DrID:UndWho)
  126. {
  127.     if(GetPropertyInt( UndWho, "Team" )==0)
  128.     {
  129.         SetPropertyString( UndWho, "Group", "");    
  130.     }
  131. }
  132.  
  133. public SomeMounted(DrID:UndWho)
  134. {
  135.     new DrID:UndWhere=GetMsgParamObject();
  136.     static bool:AutoSent=false;
  137.     if(UndWho==GetEntity( gPilotName )&&UndWhere==GetEntity( "headquarters" )&&!AutoSent)
  138.     {
  139.         AutoSent=true;
  140.         GoAuto();
  141.     }
  142. }
  143.  
  144. public SomeHQCaptured(DrID:UndHQ)
  145. {
  146.     new DebugInfo[166];
  147.     GetPropertyString( UndHQ, "StringID", 100, DebugInfo );
  148.     ConcatString( DebugInfo, 166, "HQ Captured: ", DebugInfo );
  149.     DebugMessage( DebugInfo, DL_MESSAGE );
  150.     if(IsPlayer( GetEntity( "cityhq" ))
  151.      &&IsPlayer( GetEntity( "easthq" ))
  152.      &&IsPlayer( GetEntity( "westhq" )))
  153.     {
  154.         SetCountDown( 300 );
  155.         DebugMessage( "Player holds all!", DL_MESSAGE )
  156.         AddAKEntityEvent( "GameDoneMan", ANY_ENTITY, COUNTDOWN_DONE );
  157.     }
  158.     else
  159.     {
  160.         RemoveEvent( "GameDoneMan" );
  161.         SetCountDown( -1 );
  162.         DebugMessage( "Player needs to capture something", DL_MESSAGE )
  163.     }
  164.     if(!IsPlayer( GetEntity( "cityhq" ))
  165.      &&!IsPlayer( GetEntity( "easthq" ))
  166.      &&!IsPlayer( GetEntity( "westhq" )))
  167.     {
  168.         SetObjectiveState( "SecureMortain", OS_FAILED );
  169.         GameOverMan();
  170.     }
  171.  
  172. }
  173.  
  174. public SomeEntered(DrID:UndWho)
  175. {
  176.     new DrID:UndWhere=GetMsgParamObject();
  177.  
  178.     if(UndWhere==GetEntity( "nigger1" )||UndWhere==GetEntity( "nigger2" ))
  179.     {
  180.         AddAKEntityEvent( "DogoljMeg", UndWho, UNIT_DIED, 5.0);
  181.     }
  182.  
  183.     if(UndWhere==GetEntity( "introropziarea1" )&&UndWho==GetEntity( "introrepzi" ))
  184.     {
  185.         RepziMegerkezett1();
  186.         DeActivateEntity( GetEntity( "introropziarea1" ) );
  187.     }
  188.     if(UndWhere==GetEntity( "introropziarea2" )&&UndWho==GetEntity( "introrepzi" ))
  189.     {
  190.         RepziMegerkezett2();
  191.         DeActivateEntity( GetEntity( "introropziarea2" ) );
  192.     }
  193.     if(UndWhere==GetEntity( "introropziarea3" )&&UndWho==GetEntity( "introrepzi" ))
  194.     {
  195.         RepziMegerkezett3();
  196.         DeActivateEntity( GetEntity( "introropziarea3" ) );
  197.     }
  198.     if(UndWhere==GetEntity( "introendarea" )&&UndWho==GetEntity( "introrepzi" ))
  199.     {
  200.         RepziMegerkezett4();
  201.         DeActivateEntity( GetEntity( "introendarea" ) );
  202.     }
  203.     if(UndWhere==GetEntity( "menedekarea" )&&IsPlayer(UndWho))
  204.     {
  205.         CmdUnmount( GetEntity( gPilotName ), Q_OVERRIDE );
  206.         SetPropertyInt( GetEntity( gPilotName ), "Team", gPlayerTeam );
  207.         CmdMoveToEnt( GetEntity( gPilotName ), UndWhere, Q_ENQUEUE, MF_TELEPORT );
  208.         CmdMoveToEnt( UndWho, GetEntity( gPilotName ), Q_OVERRIDE, MF_NONE );
  209.         DeActivateEntity( UndWhere );
  210.         AddTimerEvent( "PilotMovie", 3.0, "GameLogic", true );
  211.     }
  212.     if(UndWhere==GetEntity( "menedekarea" )&& UndWho==GetEntity( "pilotgetta" ))
  213.     {
  214.         CmdUnmount( GetEntity( gPilotName ), Q_OVERRIDE );
  215.         CmdUnmount( UndWho, Q_OVERRIDE, UMTF_UNMOUNT_ALL );
  216.         SetPropertyInt( GetEntity( gPilotName ), "Team", gPlayerTeam );
  217.         DeActivateEntity( UndWhere );
  218.     }
  219. }
  220.  
  221. public SomeExited(DrID:UndWho)
  222. {
  223.     new DrID:UndWhere=GetMsgParamObject();
  224.  
  225.     if(UndWhere==GetEntity( "nigger1" )||UndWhere==GetEntity( "nigger2" ))
  226.     {
  227.         RemoveEntityEvent( "DogoljMeg", UndWho);
  228.     }
  229. }
  230.  
  231. public PilotMovie()
  232. {
  233.     static PilotPart=0;
  234.     static Float:ActGameSpeed;
  235.     static Float:CameraProps[3];
  236.     static Float:CameraPos[vec3];
  237.     switch(PilotPart)
  238.     {
  239.         case 0:
  240.         {
  241.             gPilotResced=true;
  242.             CameraProps[0]=GetCameraActualDistance();
  243.             CameraProps[1]=GetCameraActualPitch();
  244.             CameraProps[2]=GetCameraActualRotate();
  245.             GetCameraActualPos( CameraPos );
  246.             ActGameSpeed=GetGameSpeed();
  247.             RemoveEvent( "PilotPart" );
  248.             SetCutScene(true);
  249.             CameraSet(30.0,55.0, 15.0)
  250.             CameraFollow( GetEntity( gPilotName ) );
  251.             AddSoundMessage("#iMS11_SP002A#", "Sounds\\Game\\Speech\\Mission\\MS11_SP002A.mp3");
  252.             AddAKEntityEvent( "PilotMovie", ANY_ENTITY, MESSAGE_END );
  253.         }
  254.         case 1:
  255.         {
  256.             SetGameSpeed( 0.01 );
  257.             CmdStop( GetEntity( gPilotName ),Q_OVERRIDE );
  258.             CameraFollow( DrID:0 );
  259.             AddSoundMessage("#iMS11_SP002B#", "Sounds\\Game\\Speech\\Mission\\MS11_SP002B.mp3");
  260.         }
  261.         case 2:
  262.         {
  263.             AddSoundMessage("#iMS11_SP002C#", "Sounds\\Game\\Speech\\Mission\\MS11_SP002C.mp3");
  264.         }
  265.         case 3:
  266.         {
  267.             AddSoundMessage("#iMS11_SP002D#", "Sounds\\Game\\Speech\\Mission\\MS11_SP002D.mp3");
  268.         }
  269.         case 4:
  270.         {
  271.             AddSoundMessage("#iMS11_SP002E#", "Sounds\\Game\\Speech\\Mission\\MS11_SP002E.mp3");
  272.         }
  273.         case 5:
  274.         {
  275.             SetCutScene(false);
  276.             CameraSet(CameraProps[2], CameraProps[1], CameraProps[0])
  277.             TeleportCamera(CameraPos );
  278.             SetGameSpeed( ActGameSpeed );
  279.             AddAKEntityEvent( "PilotDied", GetEntity( gPilotName ), UNIT_DIED );
  280.         }
  281.     }
  282.     PilotPart++;    
  283. }
  284.  
  285. public PilotDied()
  286. {
  287.     RemoveEvent( "PilotDied" );
  288.     SetObjectiveState( "FreeWilly", OS_FAILED );
  289. }
  290.  
  291. public RepziMegerkezett1()
  292. {
  293.     CameraFollow( GetEntity( "introrepzi" ) );
  294.     AddTimerEvent( "RotateLikeRepzi", 0.1 );
  295.     //AddSoundMessage("#iMS11_SP001B#",  "Sounds\\Game\\Speech\\Mission\\MS11_SP001B.mp3");
  296. }
  297.  
  298. public RepziMegerkezett2()
  299. {
  300.     //AddSoundMessage("#iMS11_SP001C#",  "Sounds\\Game\\Speech\\Mission\\MS11_SP001C.mp3");
  301. }
  302.  
  303. public RepziMegerkezett3()
  304. {
  305.     MakeVulnerable(GetEntity( "megelni" ));
  306.     DamageEntity( GetEntity( "megelni" ), 200.0, 49 );    
  307.     CmdMoveToEnt( GetEntity( "medikk" ), GetEntity( "serult" ), Q_OVERRIDE, MF_NONE);
  308.     MakeVulnerable(GetEntity( "introrepzi" ));
  309.     CmdAttack( GetEntity( "bofors1" ), Q_OVERRIDE, GetEntity( "introrepzi" ) );
  310.     CmdAttack( GetEntity( "bofors2" ), Q_OVERRIDE, GetEntity( "introrepzi" ) );
  311.     AddAKEntityEvent( "RepziSerult", GetEntity( "introrepzi" ), UNIT_DAMAGED );
  312.     Belassit();
  313.     //AddSoundMessage("#iMS11_SP001D#",  "Sounds\\Game\\Speech\\Mission\\MS11_SP001D.mp3");
  314.     CmdMount( GetEntity( "mgnest1" ), Q_OVERRIDE, GetEntity( "vicknest1" ) );
  315.     CmdMount( GetEntity( "mgnest2" ), Q_OVERRIDE, GetEntity( "vicknest2" ) );
  316.     CmdMoveToEnt( GetEntity( "bmftiger" ), GetEntity( "konigide" ), Q_OVERRIDE, MF_ATTACKMOVE);
  317.     CmdTurnToEnt( GetEntity( "bmftiger" ), GetEntity( "westbridge" ), Q_ENQUEUE );
  318.     CmdDigin(GetEntity( "bmftiger" ), Q_ENQUEUE);
  319.     UnitCallEvent(GetEntity( "bmftiger" ), "OljUrest", Q_ENQUEUE);
  320.     CmdMoveToEnt( GetEntity( "panta1" ), GetEntity( "pantaide1" ), Q_OVERRIDE, MF_ATTACKMOVE);
  321.     CmdTurnToEnt( GetEntity( "panta1" ), GetEntity( "westbridge" ), Q_ENQUEUE );
  322.     CmdDigin(GetEntity( "panta1" ), Q_ENQUEUE);
  323.     CmdMoveToEnt( GetEntity( "panta2" ), GetEntity( "pantaide2" ), Q_OVERRIDE, MF_ATTACKMOVE);
  324.     CmdTurnToEnt( GetEntity( "panta2" ), GetEntity( "westbridge" ), Q_ENQUEUE );
  325.     CmdDigin(GetEntity( "panta2" ), Q_ENQUEUE);
  326.     AddAKEntityEvent( "PantaDied", GetEntity( "panta1" ), UNIT_TEAM_CHANGED, 2.0 );
  327.     AddAKEntityEvent( "PantaDied", GetEntity( "panta2" ), UNIT_TEAM_CHANGED, 2.0 );
  328.     AddAKEntityEvent( "TigaDamag", GetEntity( "bmftiger"), UNIT_DAMAGED );
  329. }
  330.  
  331. public TigaDamag(DrID:BMFTIG)
  332. {
  333.     if(GetActualHealth( BMFTIG )<=300)
  334.     {
  335.         AddTimerEvent( "RetreatBazdmeg", 1.0, "GameLogic", true );
  336.         AddTimerEvent( "WessideTikTak", 10.0, "GameLogic", true );
  337.     }
  338. }
  339.  
  340. public PantaDied()
  341. {
  342.     if(GetPropertyInt( GetEntity( "panta1" ), "Team" )==0&&GetPropertyInt( GetEntity( "panta2" ), "Team" )==0)
  343.     {
  344.         AddTimerEvent( "RetreatBazdmeg", 5.0, "GameLogic", true );
  345.         AddTimerEvent( "WessideTikTak", 10.0, "GameLogic", true );
  346.     }
  347. }
  348.  
  349. public RetreatBazdmeg()
  350. {
  351.     RemoveEvent( "RetreatBazdmeg" );
  352.     RemoveEvent( "TigaDamag" );
  353.     RemoveEvent( "PantaDied" );
  354.     AddSoundMessage("#iMS11_SP005A#", "Sounds\\Game\\Speech\\Mission\\MS11_SP005A.mp3");
  355.     CmdDigout(GetEntity( "bmftiger"), Q_OVERRIDE);
  356.     SetBehav2Ent( GetEntity( "bmftiger"), MB_HOLD_POSITION, FB_RETURN_FIRE);
  357.     CmdMoveToEnt( GetEntity( "bmftiger"), GetEntity( "west1" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  358.     CmdMoveToEnt( GetEntity( "bmftiger"), GetEntity( "westoffa" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  359.     CmdMoveToEnt( GetEntity( "bmftiger"), GetEntity( "westoffd" ), Q_ENQUEUE, MF_DIRECT+MF_ATTACKMOVE );
  360.     RemoveEvent( "SendMeEngineerEast" );
  361.     AddTimerEvent( "SendMeEngineer", gEngineerAttack, "GameLogic", true );
  362.     SendMeEngineer();
  363. }
  364.  
  365.  
  366.  
  367. public BridgeDied()
  368. {
  369.     if(!IsAlive(GetEntity( "eastbridge" ))||!IsAlive(GetEntity( "westbridge" )))
  370.     {
  371.         if(GetObjectiveState( "BothBridges" )!=OS_FAILED)
  372.         {
  373.             AddSoundMessage("#iMS11_SP004A#","Sounds\\Game\\Speech\\Mission\\MS11_SP004A.mp3");
  374.             SetObjectiveState( "BothBridges" , OS_FAILED);
  375.         }
  376.     }
  377.  
  378.     if(!IsAlive(GetEntity( "eastbridge" ))&&!IsAlive(GetEntity( "westbridge" )))
  379.     {
  380.         SetObjectiveState( "KeepPassing" , OS_FAILED);
  381.         AddTimerEvent( "GameOverMan", 5.0, "GameLogic" , true );
  382.     }
  383. }
  384.  
  385. public Dejaktivate(DrID:UndWho)
  386. {
  387.     RemoveEntityEvent( "Dejaktivate" , UndWho);
  388.     DeActivateEntity( UndWho );
  389. }
  390.  
  391. public GoAuto()
  392. {
  393.     new DrID:DasAuto=GetEntity( "oto" );
  394.     ActivateEntity( DasAuto );
  395.     ShowEntity( DasAuto );
  396.     SetPropertyInt( DasAuto, "Team", 2 );
  397.     SetPropertyInt( DasAuto, "Team", 5 );
  398.     CmdWait(GetEntity( gPilotName), Q_OVERRIDE, 5.0);
  399.     CmdUnmount( GetEntity( gPilotName), Q_ENQUEUE );
  400.     UnitCallEvent(GetEntity( gPilotName), "ChangePilot");
  401.     AddAKEntityEvent( "ChangePilot", GetEntity( gPilotName), UNIT_UNMOUNTED );
  402.     CmdMoveToEnt( DasAuto, GetEntity( "auto1" ), Q_OVERRIDE, MF_OVERRUN );    
  403.     CmdMoveToEnt( DasAuto, GetEntity( "auto2" ), Q_ENQUEUE, MF_OVERRUN );    
  404.     CmdMoveToEnt( DasAuto, GetEntity( "auto3" ), Q_ENQUEUE, MF_NONE );
  405.     UnitCallEvent(DasAuto, "GoodByeWilly", Q_ENQUEUE);
  406. }
  407.  
  408. public GoodByeWilly(DrID:DasAuto)
  409. {
  410.     RemoveEvent( "GoodByeWilly" );
  411.     if(!IsAlive(GetEntity( gPilotName )))
  412.     {
  413.         LeaveAuto();
  414.         return;        
  415.     }        
  416.     SetPropertyInt( GetEntity( gPilotName ), "Team", 5 );
  417.     AddSoundMessage("#iMS11_SP003A#","Sounds\\Game\\Speech\\Mission\\MS11_SP003A.mp3");
  418.     CmdMount( GetEntity( gPilotName ), Q_OVERRIDE, DasAuto );
  419.     AddAKEntityEvent( "LeaveAuto", GetEntity( gPilotName ), UNIT_MOUNTED );
  420. }
  421.  
  422. public LeaveAuto()
  423. {
  424.     RemoveEvent( "LeaveAuto" );
  425.     new DrID:DasAuto=GetEntity( "oto" );
  426.     CmdMoveToEnt( DasAuto, GetEntity( "auto4" ), Q_OVERRIDE, MF_OVERRUN );    
  427.     CmdMoveToEnt( DasAuto, GetEntity( "auto5" ), Q_ENQUEUE, MF_OVERRUN );    
  428.     CmdMoveToEnt( DasAuto, GetEntity( "auto6" ), Q_ENQUEUE, MF_OVERRUN );
  429.     CmdMoveToEnt( DasAuto, GetEntity( "auto7" ), Q_ENQUEUE, MF_DIRECT );
  430.     UnitCallEvent(DasAuto, "KintVagyok");
  431. }
  432.  
  433. public KintVagyok(DrID:DasAuto)
  434. {
  435.     RemoveEvent( "KintVagyok" );
  436.     if(    GetObjectiveState( "FreeWilly")!= OS_FAILED )
  437.         SetObjectiveState( "FreeWilly", OS_COMPLETED );
  438.     DeActivateEntity( DasAuto );
  439. }
  440.  
  441. public ChangePilot(DrID:Pilot)
  442. {
  443.     SetPropertyInt( Pilot, "Team", 5 );
  444.     ShowEntity( GetEntity( "oto" ) );
  445.     RemoveEvent( "ChangePilot" );
  446. }
  447.  
  448. public RepziMegerkezett4()
  449. {
  450.     MakeVulnerable(GetEntity( "introrepzi" ));
  451.     DropPara2Ent(6, "pilot", GetEntity( "introrepzi" ), ARF_DONT_CHECK_LIMIT);
  452.     new Iterator:iti=Iterate("pilota");
  453.     while(ItNext(iti))
  454.     {
  455.         GetPropertyString( ItEntity(iti), "StringID", 65, gPilotName );
  456.     }
  457.     ItStop(iti);
  458.     SetPropertyInt( GetEntity( gPilotName ), "Team", gPlayerTeam );
  459.     CameraFollow( GetEntity( gPilotName ));
  460.     DamageEntity( GetEntity( "introrepzi" ), 666.666, 49 );
  461.     AddTimerEvent( "LeertPilota", 7.5,"GameLogic",true );
  462. }
  463.  
  464. public LeertPilota()
  465. {
  466.     RemoveEvent( "LeertPilota" );
  467.     CameraFollow( DrID:0 );
  468.     CmdMoveToEnt( GetEntity( gPilotName ), GetEntity( "menedek" ), Q_OVERRIDE, MF_RUN );
  469.     CmdMount( GetEntity( gPilotName ), Q_ENQUEUE, GetEntity( "menedek" ));
  470.     AddTimerEvent( "StartTheMap", 2.5,"GameLogic",true );
  471. }
  472.  
  473. public StartTheMap()
  474. {
  475.     AddObjective( "SecureMortain", OT_PRIMARY, "#iMS11_PS01#", "#iMS11_PL01#", OS_IN_PROGRESS);
  476.     AddObjective( "KeepPassing", OT_PRIMARY, "#iMS11_PS02#", "#iMS11_PL02#", OS_IN_PROGRESS );
  477.     AddObjective( "BothBridges", OT_SECONDARY, "#iMS11_SS01#", "#iMS11_SL01#", OS_IN_PROGRESS );
  478.     AddObjective( "FreeWilly", OT_HIDDEN, "#iMS11_HS01#", "#iMS11_HL01#", OS_IN_PROGRESS );
  479.  
  480.     AddMapTickToEnt( GetEntity( "cityhq" ), 15.0, MAPTICK_FLAG );
  481.     AddMapTickToEnt( GetEntity( "easthq" ), 15.0, MAPTICK_FLAG  );
  482.     AddMapTickToEnt( GetEntity( "westhq" ), 15.0, MAPTICK_FLAG  );
  483.  
  484.     AddMapTickToEnt( GetEntity( "westbridge" ), 15.0, MAPTICK_CIRCLE );
  485.     AddMapTickToEnt( GetEntity( "eastbridge" ), 15.0, MAPTICK_CIRCLE );
  486.  
  487.     AddTimerEvent( "SendMeEngineerEast", Float:(gEngineerAttack*1.5), "GameLogic", true );
  488.     RemoveEvent( "StartTheMap" );
  489.     SetCutScene(false);    
  490.     SetPropertyInt( GetEntity( gPilotName ), "Team", 6);
  491.     TeleportCameraToEnt( GetEntity("introropziarea2") );
  492.     CameraSet(0.0, 55.0, 45.0)
  493.     GoWest("startoff", true);
  494.     MakeVulnerable(GetEntity( "bmftiger" ));
  495.     CmdWait( GetEntity( "eassidemassif" ), Q_OVERRIDE, gEassideReinf );
  496.     UnitCallEvent( GetEntity( "eassidemassif" ), "EassideTikTak", Q_ENQUEUE);
  497.     CmdWait( GetEntity( "wessidemassif" ), Q_OVERRIDE, gWessideReinf );
  498.     UnitCallEvent( GetEntity( "wessidemassif" ), "WessideTikTak", Q_ENQUEUE);
  499.     AddTimerEvent( "GetThaPilot", gInduljPilotert, "GameLogic", true );
  500.     
  501.     if(gElozopalya)
  502.     {
  503.         AddTimerEvent( "GimmeBonusReinforce", 120.0, "GameLogic", true);    
  504.     }
  505. }
  506.  
  507. public GimmeBonusReinforce()
  508. {
  509.     RemoveEvent( "GimmeBonusReinforce" );
  510.     Reinforcement( "bonusreinf", GetEntity( "reinf2d" ), GetEntity( "reinf2a" ));
  511.     AddSoundMessage("#iMS11_SP006A#", "Sounds\\Game\\Speech\\Mission\\MS11_SP006A.mp3" );    
  512. }
  513.  
  514. public SendMeEngineerEast()
  515. {
  516.     new Float:Pozicio[vec3];
  517.     new DrID:Ingenier;
  518.  
  519.     if(IsAlive(GetEntity( "eastbridge" )))
  520.     {
  521.         if(IsPlayer( GetEntity( "easthq" ) ))
  522.         {
  523.             new arriver[66];
  524.             new deployer[66];
  525.             if(Rnd(0,1))
  526.             {
  527.                 arriver="eastoffa";
  528.                 deployer="eastoffd";
  529.             }
  530.             else
  531.             {
  532.                 arriver="eastbacka";
  533.                 deployer="eastbackd";
  534.             }
  535.             GetPropertyVec3( GetEntity( deployer ), "LogicalPos_", Pozicio );
  536.             Ingenier=CreateEntity( "ax_engineer", Pozicio );
  537.             CmdMoveToEnt( Ingenier, GetEntity( arriver ), Q_OVERRIDE, MF_DIRECT );
  538.             CmdMoveToEnt( Ingenier, GetEntity( "east1" ), Q_ENQUEUE, MF_NONE);
  539.             CmdMoveToEnt( Ingenier, GetEntity( "east2" ), Q_ENQUEUE, MF_NONE);
  540.             CmdDetonate(Ingenier, Q_ENQUEUE,GetEntity( "eastbridge" ));
  541.             CmdMoveToEnt( Ingenier, GetEntity( "east1" ), Q_ENQUEUE, MF_NONE);
  542.         }
  543.     }
  544. }
  545.  
  546. public SendMeEngineer()
  547. {
  548.     new Float:Pozicio[vec3];
  549.     new DrID:Ingenier;
  550.  
  551.     if(IsAlive(GetEntity( "eastbridge" )))
  552.     {
  553.         if(IsPlayer( GetEntity( "easthq" ) ))
  554.         {
  555.             new arriver[66];
  556.             new deployer[66];
  557.             if(Rnd(0,1))
  558.             {
  559.                 arriver="eastoffa";
  560.                 deployer="eastoffd";
  561.             }
  562.             else
  563.             {
  564.                 arriver="eastbacka";
  565.                 deployer="eastbackd";
  566.             }
  567.             GetPropertyVec3( GetEntity( deployer ), "LogicalPos_", Pozicio );
  568.             Ingenier=CreateEntity( "ax_engineer", Pozicio );
  569.             CmdMoveToEnt( Ingenier, GetEntity( arriver ), Q_OVERRIDE, MF_DIRECT );
  570.             CmdMoveToEnt( Ingenier, GetEntity( "east1" ), Q_ENQUEUE, MF_NONE);
  571.             CmdMoveToEnt( Ingenier, GetEntity( "east2" ), Q_ENQUEUE, MF_NONE);
  572.              CmdDetonate(Ingenier, Q_ENQUEUE, GetEntity( "eastbridge" ));
  573.             CmdMoveToEnt( Ingenier, GetEntity( "east1" ), Q_ENQUEUE, MF_NONE);
  574.         }
  575.     }
  576.  
  577.     if(IsAlive(GetEntity( "westbridge" )))
  578.     {
  579.         GetPropertyVec3( GetEntity( "westoffd" ), "LogicalPos_", Pozicio );
  580.         Ingenier=CreateEntity( "ax_engineer", Pozicio );
  581.         CmdMoveToEnt( Ingenier, GetEntity( "westoffa" ), Q_OVERRIDE, MF_DIRECT );
  582.         CmdMoveToEnt( Ingenier, GetEntity( "west1" ), Q_ENQUEUE, MF_NONE);
  583.         CmdMoveToEnt( Ingenier, GetEntity( "west2" ), Q_ENQUEUE, MF_NONE);
  584.         CmdDetonate(Ingenier, Q_ENQUEUE , GetEntity( "westbridge"));
  585.         CmdMoveToEnt( Ingenier, GetEntity( "west1" ), Q_ENQUEUE, MF_NONE);
  586.     }
  587. }
  588.  
  589.  
  590. public GetThaPilot()
  591. {
  592.     RemoveEvent( "GetThaPilot" );
  593.     ActivateEntity( GetEntity( "pilotgetta" ) );
  594.     ShowEntity( GetEntity( "pilotgetta" )  );
  595.     CmdMoveToEnt( GetEntity( "pilotgetta" ) , GetEntity( "west1" ), Q_OVERRIDE, MF_OVERRUN );
  596.     CmdMoveToEnt( GetEntity( "pilotgetta" ) , GetEntity( "introendarea" ), Q_ENQUEUE, MF_OVERRUN );
  597.     CmdMoveToEnt( GetEntity( "pilotgetta" ) , GetEntity( "menedekarea" ), Q_ENQUEUE, MF_OVERRUN );
  598.     UnitCallEvent(GetEntity( "pilotgetta" ) , "OttVagyunk", Q_ENQUEUE);
  599. }
  600.  
  601. public OttVagyunk(DrID:UndWho)
  602. {
  603.     if(!gPilotResced)
  604.     {
  605.         CmdUnmount( GetEntity( gPilotName ), Q_OVERRIDE );
  606.     }
  607.     CmdUnmount( GetEntity( "pilotgetta" ) , Q_OVERRIDE );
  608.     SetBehav( "pilotgettaz", MB_UNMODIFIED, FB_FIRE_AT_WILL);
  609.     if(!gPilotResced)
  610.     {
  611.         DeActivateEntity( GetEntity( "menedekarea" ) );
  612.     }
  613. }
  614.  
  615. public WessideTikTak()
  616. {
  617.     RemoveEvent( "WessideTikTak" );
  618.     new Randomma=Rnd(1,3);
  619.     new lTmpStr[66];
  620.     Int2Str( Randomma, lTmpStr, 66, "" );
  621.     ConcatString( lTmpStr, 66, "westside", lTmpStr );
  622.     Reinforcement( lTmpStr, GetEntity( "westoffd" ), GetEntity( "westoffa" ) );
  623.     CmdWait( GetEntity( "wessidemassif" ), Q_OVERRIDE, gWessideReinf );
  624.     UnitCallEvent( GetEntity( "wessidemassif" ), "WessideTikTak", Q_ENQUEUE);
  625.     SetBehav( "westside", MB_MOVE_IN_VICINITY, FB_FIRE_AT_WILL, _, DB_WRECKSONLY);
  626.     new Iterator:iti=Iterate("westside");
  627.     while(ItNext(iti))
  628.     {
  629.         GetPropertyString( ItEntity(iti), "EntityBaseName", 66, lTmpStr );
  630.         if(CompareString( lTmpStr, "ax_Sdkfz 11" )==0)
  631.         {
  632. //            ShowShortMessage( "Sdkfz 11 erkezett" );
  633.             CmdWait( ItEntity(iti), Q_OVERRIDE, 10.0 );
  634.             SetBehav2Ent( ItEntity(iti), _, FB_HOLD_FIRE, UB_EVAC);            
  635.         }    
  636.     }
  637.     GoWest("westside", true);
  638. }
  639.  
  640. public EassideTikTak()
  641. {
  642.     RemoveEvent( "EassideTikTak" );
  643.     new Randomma=Rnd(1,3);
  644.     new lTmpStr[66];
  645.     Int2Str( Randomma, lTmpStr, 66, "" );
  646.     new arriver[66];
  647.     new deployer[66];
  648.     if(Rnd(0,1))
  649.     {
  650.         arriver="eastoffa";
  651.         deployer="eastoffd";
  652.     }
  653.     else
  654.     {
  655.         arriver="eastbacka";
  656.         deployer="eastbackd";
  657.     }
  658.  
  659.     ConcatString( lTmpStr, 66, "eastside", lTmpStr );
  660.     Reinforcement( lTmpStr, GetEntity( deployer ), GetEntity( arriver ) );
  661.     CmdWait( GetEntity( "eassidemassif" ), Q_OVERRIDE, gEassideReinf );
  662.     UnitCallEvent( GetEntity( "eassidemassif" ), "EassideTikTak", Q_ENQUEUE);
  663.     SetBehav( "eastside", MB_MOVE_IN_VICINITY, FB_FIRE_AT_WILL, _, DB_WRECKSONLY);
  664.     new Iterator:iti=Iterate("eastside");
  665.     while(ItNext(iti))
  666.     {
  667.         GetPropertyString( ItEntity(iti), "EntityBaseName", 66, lTmpStr );
  668.         if(CompareString( lTmpStr, "ax_Sdkfz 11" )==0)
  669.         {
  670. //            ShowShortMessage( "Sdkfz 11 erkezett" );
  671.             CmdWait( ItEntity(iti), Q_OVERRIDE, 10.0 );
  672.             SetBehav2Ent( ItEntity(iti), _, FB_HOLD_FIRE, UB_EVAC);            
  673.         }    
  674.     }
  675.     GoEast("eastside", true);
  676. }
  677.  
  678. public StartIntro()
  679. {
  680.      if(CheatDetector())
  681.      {
  682.          return;
  683.      }
  684.     SetCutScene(true);
  685.     TeleportCameraToEnt(GetEntity( "repair" ));
  686.     AddSoundMessage("#iMS11_SP001A#",  "Sounds\\Game\\Speech\\Mission\\MS11_SP001A.mp3");
  687.     CameraSet(0.0, 55.0, 30.0)
  688.     CmdAttack( GetEntity( "megelni" ), Q_OVERRIDE, GetEntity( "bmftiger" ));
  689.     CmdAttack( GetEntity( "bmftiger" ), Q_OVERRIDE, GetEntity( "megelni" ));
  690.     new Iterator:iti=Iterate("meghalni");
  691.     while(ItNext(iti))
  692.     {
  693.         DamageEntity( ItEntity(iti), 666.666, 49 );
  694.     }
  695.     ItStop(iti);
  696.     new DrID:Repzi=GetEntity( "introrepzi");
  697.     MakeInvulnerable(Repzi);
  698.     CmdMoveToEnt( Repzi, GetEntity( "introropziarea1" ), Q_OVERRIDE, MF_NONE );
  699.     CmdMoveToEnt( Repzi, GetEntity( "introropziarea2" ), Q_ENQUEUE, MF_NONE );
  700.     CmdMoveToEnt( Repzi, GetEntity( "introropziarea3" ), Q_ENQUEUE, MF_NONE );
  701.     CmdMoveToEnt( Repzi, GetEntity( "introendarea" ), Q_ENQUEUE, MF_NONE );
  702.     CmdSetWM(GetEntity( "bofors1" ), Q_OVERRIDE, WM_AIR);
  703.     CmdSetWM(GetEntity( "bofors2" ), Q_OVERRIDE, WM_AIR);
  704.     CmdMoveToEnt( GetEntity( "serultke" ), GetEntity( "repair" ),Q_OVERRIDE, MF_DIRECT );
  705. }
  706.  
  707. public RotateLikeRepzi()
  708. {
  709.     SetCameraTargetRotate( GetEntityDir(GetEntity( "introrepzi" ) , DB_X_AXIS )-90.0);
  710. }
  711.  
  712. public RepziSerult()
  713. {
  714.     MakeInvulnerable(GetEntity( "introrepzi" ));
  715.     AddTimerEvent( "AjmHit", 1.5, "GameLogic", true );
  716.     RemoveEvent( "RepziSerult" );
  717. }
  718.  
  719. public AjmHit()
  720. {
  721.     RemoveEvent( "AjmHit" );    
  722.     //AddSoundMessage("#iMS11_SP001E#",  "Sounds\\Game\\Speech\\Mission\\MS11_SP001E.mp3");
  723.     new DrID:Repzi=GetEntity( "introrepzi");    
  724.  
  725.     MakeVulnerable(Repzi);
  726.     DamageEntity( Repzi, Float:(GetActualHealth(Repzi)-1.0), 49 );
  727.     MakeInvulnerable(Repzi);    
  728.  
  729.     RemoveEvent( "RotateLikeRepzi" );
  730. }
  731.  
  732. //======================================================================================================
  733. public TeamElimSucceed()
  734. {
  735.     new Team=GetMsgParamInt();      
  736.     if(Team==123)
  737.     {
  738.         SetCutScene(true);
  739.         GameOverMan();
  740.         SetObjectiveState( "SecureMortain", OS_FAILED );        
  741.     }
  742.     if(Team==666&&GetDifficulty()==0)
  743.     {
  744.         Reinforcement( "easy_extra", GetEntity( "reinf2d" ), GetEntity( "reinf2a" ));
  745.         Reinforcement( "easy_extra", GetEntity( "eastd" ), GetEntity( "easta" ));
  746.     }
  747. }
  748.  
  749. //======================================================================================================
  750. // Add your functions here:
  751. public Belassit()
  752. {
  753.     RemoveEvent( "Belassit" );
  754.     AddTimerEvent( "RealLassit", 0.01, "AnimLogic", false );
  755.     AddTimerEvent( "Kilassit", 4.5, "AnimLogic", true );
  756. }
  757.  
  758. public Kilassit()
  759. {
  760.     RemoveEvent( "Kilassit" );
  761.     AddTimerEvent( "RealLassit", 0.01, "AnimLogic", false );
  762. }
  763.  
  764. public RealLassit()
  765. {
  766.     static Float:OrigGameSpeed;
  767.     static Float:TargetGameSpeed=0.1;
  768.     static Float:SpeedLeptek;
  769.     static bool:Init=true;
  770.     static bool:Lassit=true;
  771.     if(Init)
  772.     {
  773.         OrigGameSpeed=GetGameSpeed();
  774.         SpeedLeptek=(OrigGameSpeed-TargetGameSpeed)/66.0;
  775.         Init=false;
  776.     }
  777.     SetGameSpeed(GetGameSpeed()-SpeedLeptek);
  778.     if(GetGameSpeed()<=TargetGameSpeed && Lassit) //lelassult
  779.     {
  780.         SetGameSpeed( TargetGameSpeed );
  781.         TargetGameSpeed=OrigGameSpeed;
  782.         Init=true;
  783.         Lassit=false;
  784.         RemoveEvent( "RealLassit" );
  785.     }
  786.     if(GetGameSpeed()>=TargetGameSpeed && !Lassit) //felgyorsult
  787.     {
  788.         SetGameSpeed( TargetGameSpeed );
  789.         TargetGameSpeed=OrigGameSpeed;
  790.         Init=true;
  791.         Lassit=true;
  792.         RemoveEvent( "RealLassit" );
  793.     }
  794. }
  795.  
  796. public OljUrest(DrID:UndWho)
  797. {
  798.     RemoveEntityEvent("OljUrest", UndWho);
  799.     SetPropertyInt( UndWho, "DestroyEmptyBehavior", 3 );
  800. }
  801.  
  802. //======================================================================================================
  803. public ObjectiveChanged()
  804. {
  805.     // Check objectives here
  806. }
  807.  
  808. public GoEast(Group[],bool:Direction)
  809. {
  810.     if(Direction)
  811.     {
  812.         CmdGroupMoveToEnt( Group, GetEntity( "east1" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  813.         CmdGroupMoveToEnt( Group, GetEntity( "east2" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  814.         if(IsAlive(GetEntity( "eastbridge" )))
  815.         {
  816.             CmdGroupMoveToEnt( Group, GetEntity( "east3" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  817.             CmdGroupMoveToEnt( Group, GetEntity( "east4" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  818.             if(GetPropertyInt( GetEntity( "easthq" ), "Team" )==gPlayerTeam)
  819.             {
  820.                 CmdGroupMoveToEnt( Group, GetEntity( "eastbase" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );        
  821.             }
  822.             if(GetPropertyInt( GetEntity( "cityhq" ), "Team" )==gPlayerTeam)
  823.             {
  824.                 GoLow(Group, true);
  825.             }
  826.         }
  827.         else
  828.         {
  829.             CmdGroupMoveToEnt( Group, GetEntity( "east1" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  830.             GoUp(Group, true);
  831.         }
  832.     }
  833. }
  834.  
  835. public GoWest(Group[],bool:Direction)
  836. {
  837.     if(Direction)
  838.     {
  839.         CmdGroupMoveToEnt( Group, GetEntity( "west1" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  840.         if(GetPropertyInt( GetEntity( "westhq" ), "Team" )==gPlayerTeam)
  841.         {
  842.             CmdGroupMoveToEnt( Group, GetEntity( "westbase" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );        
  843.         }
  844.         CmdGroupMoveToEnt( Group, GetEntity( "west2" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  845.         if(IsAlive(GetEntity( "westbridge" )))
  846.         {
  847.             CmdGroupMoveToEnt( Group, GetEntity( "west3" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  848.             CmdGroupMoveToEnt( Group, GetEntity( "west4" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  849.             if(GetPropertyInt( GetEntity( "cityhq" ), "Team" )==gPlayerTeam)
  850.             {
  851.                 CmdGroupMoveToEnt( Group, GetEntity( "citybase" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );                
  852.             }
  853.             if(GetPropertyInt( GetEntity( "easthq" ), "Team" )==gPlayerTeam)
  854.             {
  855.                 GoLow(Group, false);
  856.             }
  857.         }
  858.         else
  859.         {
  860.             GoUp(Group, false);
  861.         }
  862.     }    
  863. }
  864.  
  865. public GoUp(Group[],bool:Direction)
  866. {
  867.     if(Direction)
  868.     {
  869.         CmdGroupMoveToEnt( Group, GetEntity( "up1" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  870.         CmdGroupMoveToEnt( Group, GetEntity( "up2" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  871.         CmdGroupMoveToEnt( Group, GetEntity( "up3" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  872.         CmdGroupMoveToEnt( Group, GetEntity( "up4" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  873.         CmdGroupMoveToEnt( Group, GetEntity( "up5" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  874.         GoWest(Group, true);
  875.     }
  876.     else
  877.     {
  878.         CmdGroupMoveToEnt( Group, GetEntity( "up5" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  879.         CmdGroupMoveToEnt( Group, GetEntity( "up4" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  880.         CmdGroupMoveToEnt( Group, GetEntity( "up3" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  881.         CmdGroupMoveToEnt( Group, GetEntity( "up2" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  882.         CmdGroupMoveToEnt( Group, GetEntity( "up1" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );
  883.         GoEast(Group, true);
  884.     }
  885. }
  886.  
  887. public GoLow(Group[],bool:Direction)
  888. {
  889.     if(Direction)
  890.     {
  891.         CmdGroupMoveToEnt( Group, GetEntity( "low1" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  892.         CmdGroupMoveToEnt( Group, GetEntity( "low2" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  893.         CmdGroupMoveToEnt( Group, GetEntity( "low3" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  894.         if(GetPropertyInt( GetEntity( "cityhq" ), "Team" )==gPlayerTeam)
  895.         {
  896.             CmdGroupMoveToEnt( Group, GetEntity( "citybase" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );                
  897.         }        
  898.     }
  899.     else
  900.     {
  901.         if(GetPropertyInt( GetEntity( "cityhq" ), "Team" )==gPlayerTeam)
  902.         {
  903.             CmdGroupMoveToEnt( Group, GetEntity( "citybase" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );                
  904.         }        
  905.         CmdGroupMoveToEnt( Group, GetEntity( "low3" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  906.         CmdGroupMoveToEnt( Group, GetEntity( "low2" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  907.         CmdGroupMoveToEnt( Group, GetEntity( "low1" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );    
  908.         if(GetPropertyInt( GetEntity( "easthq" ), "Team" )==gPlayerTeam)
  909.         {
  910.             CmdGroupMoveToEnt( Group, GetEntity( "eastbase" ), Q_ENQUEUE, MF_ATTACKMOVE+MF_OVERRUN );                
  911.         }        
  912.     }
  913. }
  914.  
  915. public GameDoneMan()
  916. {
  917.     SetObjectiveState( "SecureMortain", OS_COMPLETED );
  918.     SetObjectiveState( "KeepPassing", OS_COMPLETED );
  919.     if(GetObjectiveState( "BothBridges" )!=OS_FAILED)
  920.     {
  921.         SetObjectiveState( "BothBridges", OS_COMPLETED );
  922.     }
  923.  
  924.     if(GetObjectiveState( "FreeWilly" )==OS_IN_PROGRESS
  925.     &&IsAlive(GetEntity( gPilotName )))
  926.     {
  927.         SetObjectiveState( "FreeWilly", OS_COMPLETED );
  928.     }
  929.     else
  930.     {
  931.         if(GetObjectiveState( "FreeWilly" )!=OS_COMPLETED)
  932.             SetObjectiveState( "FreeWilly", OS_FAILED );    
  933.     }
  934.     
  935.     if(GetObjectiveState( "FreeWilly" )==OS_COMPLETED)
  936.     {
  937.         SetGlobalVariable("gvMS11_Pilot",1);
  938.     }
  939.     else
  940.     {
  941.         SetGlobalVariable("gvMS11_Pilot",0);
  942.     }
  943.     
  944.     RemoveEvent( "GameDoneMan" );
  945.     AddDebriefing("#iMISSION11_DB_P#");
  946.     if(GetObjectiveState( "FreeWilly" )==OS_COMPLETED)
  947.     {
  948.         AddDebriefing("#iMISSION11_DB_H#");
  949.     }
  950.     SetCutScene(true);
  951.     EndMission( MS_ACCOMPLISHED );
  952. }
  953.  
  954. public GameOverMan()
  955. {
  956.     RemoveEvent( "GameOverMan" );
  957.     AddDebriefing("#iMISSION_DB_F#");
  958.     SetCutScene(true);
  959.     EndMission( MS_FAILED );
  960. }
  961.  
  962. public YouReDaRealNigger()
  963. {
  964.     static Float:Lofasz=1.0;
  965.     new Float:lTmpVec3[vec3];
  966.     GetPropertyVec3( GetEntity( "nigger1" ), "LogicalPos_", lTmpVec3 );
  967.     lTmpVec3[vec3:x]+=Lofasz;
  968.     SetPropertyVec3( GetEntity( "nigger1" ), "Pos", lTmpVec3 );
  969.  
  970.     GetPropertyVec3( GetEntity( "nigger2" ), "LogicalPos_", lTmpVec3 );
  971.     lTmpVec3[vec3:x]+=Lofasz;
  972.     SetPropertyVec3( GetEntity( "nigger2" ), "Pos", lTmpVec3 );
  973.  
  974.     if(Lofasz==1.0)
  975.     {
  976.         Lofasz=-1.0;
  977.     }
  978.     else
  979.     {
  980.         Lofasz=1.0;
  981.     }
  982.     
  983.     new Iterator:iti=Iterate("nigger1");
  984.     new DrID:Ureske;
  985.     while(ItNext(iti))
  986.     {
  987.         Ureske=ItEntity(iti);
  988.         if(IsInstanceOf( Ureske, GetClassID( "cVehicle" ) )&&!IsWreck(Ureske)&&(GetPropertyInt( Ureske, "Team" )==0))
  989.         {
  990.             DamageEntity( Ureske, 5.0, 49 );
  991.         }
  992.     }
  993.  
  994.     iti=Iterate("nigger2");
  995.     while(ItNext(iti))
  996.     {
  997.         Ureske=ItEntity(iti);
  998.         if(IsInstanceOf( Ureske, GetClassID( "cVehicle" ) )&&!IsWreck(Ureske)&&(GetPropertyInt( Ureske, "Team" )==0))
  999.         {
  1000.             DamageEntity( Ureske, 10.0, 49 );
  1001.         }
  1002.     }
  1003. }
  1004.  
  1005. public DogoljMeg(DrID:Hullajelolt)
  1006. {
  1007.     RemoveEntityEvent( "DogoljMeg" , Hullajelolt);
  1008.     DamageEntity( Hullajelolt, 1000.0, 49 );    
  1009. }
  1010.