home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2006 April
/
Gamestar_83_2006-04_dvd.iso
/
Dema
/
demowot_english.exe
/
Script
/
Source
/
Chapter2
/
MS07-C2L3.sma
< prev
next >
Wrap
Text File
|
2005-03-11
|
44KB
|
1,454 lines
//#define Pofazz(%1) AddSoundMessage("#iMS07_SP0%1#","Sounds\\Game\\Speech\\Mission\\TEMPORARY.wav")
#define Pofazz(%1) AddSoundMessage("#iMS07_SP0%1#","Sounds\\Game\\Speech\\Mission\\MS07_SP0%1.mp3")
//new gTempWav[]="Sounds\\Game\\Speech\\Mission\\TEMPORARY.wav";
// TODO: ===============================================================================================
// Write here tasks to be done.
// DECLARATIONS: =======================================================================================
#include "script.inc"
#include "antiair.inc"
const gConvoyTotal = 3; //the number of convoys controlled
new gConvoyArray[gConvoyTotal][5] = {{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0}}; //the actual position of the convoy
new gConvoyNames[gConvoyTotal][25] = {{"sevi"},{"sevi"},{"sevi"}}; //the name basic of the convoy
new gConvoyWPNames[gConvoyTotal][25] = {{"konv"},{"konvok"},{"konvgaz"}}; //the name basic of the convoy waypoints
new gConvoyCount[gConvoyTotal] = {5,5,5}; //the number of the convoy members
new gConvoyWPCount[gConvoyTotal] = {10,16,16}; //the number of the convoy waypoints
new Float:gConvoyStartDelays[gConvoyTotal] = {1.5,0.0,0.0}; //the delay beetween convoy members start
#include "convoycontrol.inc"
// Write here global variable declarations and definitions. All globals should start with letter: 'g'!
new gActConvoy=0;
new gKintSevi=0;
new gMinSevi;
new Float:gReinfTajm;
new Float:gKonvoyHalt;
new Float:gVonatzTimer;
new bool:gElozopalya;
new bool:OdebbDuma=true;
new Wagonz[5][166]={{"loco"},{"wagon1"},{"wagon2"},{"wagon3"},{"wagon4"}};
//======================================================================================================
public main() // A palya belepesi pontja, helyette a PostGameStart fuggvenyt hasznald
CommonAKMain();
//======================================================================================================
public PostGameStart()
{
// Some must have stuff:
CommonAKInit();
new OjjettivaLong[166];
new OjjettivaShort[166];
switch(GetDifficulty())
{
case 0:
{
gVonatzTimer=420.0;
gKonvoyHalt=180.0;
gReinfTajm=180.0;
gMinSevi=2;
OjjettivaLong="#iMS07_PL01A#";
OjjettivaShort="#iMS07_PS01A#";
}
case 1,2:
{
gVonatzTimer=300.0;
gKonvoyHalt=120.0;
gReinfTajm=90.0;
gMinSevi=3;
OjjettivaLong="#iMS07_PL01B#";
OjjettivaShort="#iMS07_PS01B#";
}
case 3:
{
gVonatzTimer=210.0;
gKonvoyHalt=45.0;
gReinfTajm=45.0;
gMinSevi=4;
OjjettivaLong="#iMS07_PL01C#";
OjjettivaShort="#iMS07_PS01C#";
}
}
// Add objectives:
new lTmpStr[166];
Int2Str( gMinSevi, lTmpStr, 66, "" );
AddObjective( "sevroz", OT_PRIMARY, OjjettivaShort, OjjettivaLong, OS_IN_PROGRESS);
AddObjective( "AAKill", OT_SECONDARY, "#iMS07_SS01#", "#iMS07_SL01#", OS_IN_PROGRESS);
AddObjective( "Vonatz", OT_HIDDEN, "#iMS07_HS01#", "#iMS07_HL01#", OS_IN_PROGRESS );
// Add objective related events:
AddUserEvent( "TeamElimSucceed", UE_TEAMELIM_SUCC );
// AddUserEvent( "GroupSurviveFailed", UE_GROUP_SURV_FAIL );
AddUserEvent( "ObjectiveChanged", UE_OBJECTIVE_CHANGED );
// Additional Mission Objective:
// Start doing some things:
// AddAKEntityEvent( "SzonyegBombazas", ANY_ENTITY, TEST_EVENT );
IntroControl();
// AddAKEntityEvent( "SendBigReinf2Playa", ANY_ENTITY, TEST_EVENT );
gElozopalya=(GetGlobalVariable("gvMS06_OilTankz")==1);
AddAKEntityEvent( "VonatStart", ANY_ENTITY, TEST_EVENT );
Haulemall();
}
public HolAConvoy()
{
new i;
new j;
new Str[255];
new TmpStr[255];
Str="Convoys: #b#";
for(i=0;i<gConvoyTotal;i++)
{
Int2Str( i, TmpStr, 5,"" );
ConcatString( Str, 255, Str, TmpStr);
ConcatString( Str, 255, Str, ": " );
for(j=0;j<5;j++)
{
Int2Str( j, TmpStr, 5,"" );
ConcatString( Str, 255, Str, TmpStr);
ConcatString( Str, 255, Str, "@" );
Int2Str( gConvoyArray[i][j], TmpStr, 5,"" );
ConcatString( Str, 255, Str, TmpStr);
ConcatString( Str, 255, Str, "; " );
}
ConcatString( Str, 255, Str, "#b#" );
}
SetShortInfo(Str);
}
public MapInitiale()
{
AddAKEntityEvent( "RadioCarDamaged", GetEntity( "radiocar" ), UNIT_DAMAGED );
HackAntiAirInit();
AddAKEntityEvent( "SomeEntered", ANY_ENTITY, UNIT_AREA_ENTER );
AddAKEntityEvent( "SomeHQCaptured", ANY_ENTITY, HQ_TAKEOVER );
AddTimerEvent( "YouReDaRealNigger", 1.0 );
GiveAirRecon(gPlayerTeam);
GiveAirStrike(gPlayerTeam);
AddAKEntityEvent( "CheckOurPrimary", GetEntity( "sevi1" ), UNIT_DIED );
AddAKEntityEvent( "CheckOurPrimary", GetEntity( "sevi2" ), UNIT_DIED );
AddAKEntityEvent( "CheckOurPrimary", GetEntity( "sevi3" ), UNIT_DIED );
AddAKEntityEvent( "CheckOurPrimary", GetEntity( "sevi4" ), UNIT_DIED );
AddAKEntityEvent( "CheckOurPrimary", GetEntity( "sevi5" ), UNIT_DIED );
new Iterator:iti=Iterate("antiair")
while(ItNext(iti))
{
AddAKEntityEvent( "AntiAirTeamChanged", ItEntity(iti), UNIT_TEAM_CHANGED );
}
ItStop(iti);
iti=Iterate("sevizz");
while (ItNext(iti))
{
MakeUnSelectable(ItEntity(iti));
MakeNOTMountable(ItEntity(iti));
AddAKEntityEvent( "MeghalszGeci", ItEntity(iti), UNIT_TEAM_CHANGED );
}
ItStop(iti);
}
public AntiAirTeamChanged()
{
if(CountLivingMates( "antiair", 1 )==0)
{
RemoveEvent( "AntiAirTeamChanged" );
SzonyegBombazas();
}
}
public RadioCarDamaged(DrID:UndWho)
{
if(IsAlive(UndWho)&&!IsPlayer( UndWho )&&GetActualHealth( UndWho )<=60)
{
RemoveEvent( "RadioCarDamaged" );
CmdMoveToEnt( UndWho, GetEntity( "seggbe13" ), Q_OVERRIDE, MF_NONE );
}
}
public SomeHQCaptured(DrID:UndWho)
{
static IsBridgeKill=true;
if(UndWho==GetEntity( "hq1" )&&IsPlayer(UndWho)&&IsBridgeKill)
{
BridgeKill();
IsBridgeKill=false;
AddTimerEvent( "VonatStart", gVonatzTimer, "GameLogic", true);
}
if(UndWho==GetEntity( "hq2" )&&IsPlayer(UndWho)&&(GetObjectiveState( "Vonatz")== OS_IN_PROGRESS ))
{
RemoveEvent( "VonatStart" );
SetObjectiveState( "Vonatz", OS_COMPLETED );
}
}
public SomeEntered(DrID:UndWho)
{
new DrID:UndWhere=GetMsgParamObject();
if(UndWhere==GetEntity( "kifele" )&&IsInSelector( UndWho, "sevizz" ))
{
CmdMoveToEnt( UndWho, GetEntity( "konvok15" ), Q_OVERRIDE, MF_DIRECT );
CmdMoveToEnt( UndWho, GetEntity( "konvok16" ), Q_OVERRIDE, MF_DIRECT );
UnitCallEvent(UndWho,"KiertSevi");
}
if(UndWhere==GetEntity( "triggernigger" )&&IsPlayer( UndWho ))
{
DeActivateEntity( UndWhere );
CmdMoveToEnt( GetEntity( "reinf_pziv1" ), GetEntity( "tankza" ), Q_OVERRIDE, MF_ATTACKMOVE );
CmdMoveToEnt( GetEntity( "reinf_pziv2" ), GetEntity( "tankza" ), Q_OVERRIDE, MF_ATTACKMOVE );
CmdMoveToEnt( GetEntity( "reinf_pant1" ), GetEntity( "tankza" ), Q_OVERRIDE, MF_ATTACKMOVE );
CmdMoveToEnt( GetEntity( "reinf_arti1" ), GetEntity( "tankza" ), Q_OVERRIDE, MF_ATTACKMOVE );
CmdMoveToEnt( GetEntity( "reinf_arti2" ), GetEntity( "tankza" ), Q_OVERRIDE, MF_ATTACKMOVE );
CmdMoveToEnt( GetEntity( "reinf_pziv1" ), GetEntity( "pziv_ok1" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( GetEntity( "reinf_pziv2" ), GetEntity( "pziv_ok2" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( GetEntity( "reinf_pant1" ), GetEntity( "pant_ok1" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( GetEntity( "reinf_arti1" ), GetEntity( "arti1" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( GetEntity( "reinf_arti2" ), GetEntity( "arti2" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdTurnToEnt( GetEntity( "reinf_pziv1" ), GetEntity( "dasbridge" ) , Q_ENQUEUE);
CmdTurnToEnt( GetEntity( "reinf_pziv2" ), GetEntity( "dasbridge" ) , Q_ENQUEUE);
CmdTurnToEnt( GetEntity( "reinf_pant1" ), GetEntity( "dasbridge" ) , Q_ENQUEUE);
CmdTurnToEnt( GetEntity( "reinf_arti1" ), GetEntity( "dasbridge" ) , Q_ENQUEUE);
CmdTurnToEnt( GetEntity( "reinf_arti2" ), GetEntity( "dasbridge" ) , Q_ENQUEUE);
CmdDigin( GetEntity( "reinf_pziv1" ), Q_ENQUEUE);
CmdDigin( GetEntity( "reinf_pziv2" ), Q_ENQUEUE);
CmdDigin( GetEntity( "reinf_pant1" ), Q_ENQUEUE);
}
}
public BridgeKill()
{
RemoveEvent( "BridgeKill" );
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "robbantokide" ), Q_OVERRIDE, MF_NONE );
UnitCallEvent(GetEntity( "robbanterz" ), "OttARobbantoz");
}
public OttARobbantoz(DrID:UndWho)
{
RemoveEvent( "OttARobbantoz" );
CmdUnmount( GetEntity( "geci1" ), Q_OVERRIDE );
CmdUnmount( GetEntity( "geci2" ), Q_OVERRIDE );
CmdDetonate(GetEntity( "geci1" ), Q_ENQUEUE, GetEntity( "dasbridge" ));
CmdDetonate(GetEntity( "geci2" ), Q_ENQUEUE, GetEntity( "dasbridge" ));
CmdMount( GetEntity( "geci1" ), Q_ENQUEUE, GetEntity( "robbanterz" ) );
CmdMount( GetEntity( "geci2" ), Q_ENQUEUE, GetEntity( "robbanterz" ) );
AddAKEntityEvent( "GeciMounted", GetEntity( "geci1" ), UNIT_MOUNTED );
AddAKEntityEvent( "GeciMounted", GetEntity( "geci2" ), UNIT_MOUNTED );
AddAKEntityEvent( "GeciMounted", GetEntity( "geci1" ), UNIT_DIED );
AddAKEntityEvent( "GeciMounted", GetEntity( "geci2" ), UNIT_DIED );
AddAKEntityEvent( "NoMoreBridge", GetEntity( "dasbridge" ), UNIT_DIED );
}
public GeciMounted(DrID:UndWho)
{
if((!IsAlive(GetEntity( "geci1" ))||IsMountedIn(GetEntity( "geci1" ))==GetEntity( "robbanterz" ))
&&(!IsAlive(GetEntity( "geci2" ))||IsMountedIn(GetEntity( "geci2" ))==GetEntity( "robbanterz" )))
{
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "konvok5" ), Q_OVERRIDE, MF_OVERRUN );
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "konvok6" ), Q_ENQUEUE, MF_OVERRUN );
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "konvok7" ), Q_ENQUEUE, MF_OVERRUN );
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "konvok8" ), Q_ENQUEUE, MF_OVERRUN );
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "konvok9" ), Q_ENQUEUE, MF_OVERRUN );
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "konvok10" ), Q_ENQUEUE, MF_OVERRUN );
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "konvgaz11" ), Q_ENQUEUE, MF_OVERRUN );
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "konvgaz10" ), Q_ENQUEUE, MF_OVERRUN );
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "konvgaz9" ), Q_ENQUEUE, MF_OVERRUN );
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "tankza" ), Q_ENQUEUE, MF_OVERRUN );
CmdMoveToEnt( GetEntity( "robbanterz" ), GetEntity( "tankzd" ), Q_ENQUEUE, MF_DIRECT );
UnitCallEvent(GetEntity( "robbanterz" ), "DeactivateMePls");
}
}
public NoMoreBridge()
{
RemoveEvent( "NoMoreBridge" );
RemoveEvent( "YouReDaRealNigger" );
if(gActConvoy==1)
{
ResetConvoy(0);
ResetConvoy(1);
ResetConvoy(2);
gActConvoy=2;
RemoveEvent( "ContinueConvoy" );
BridgeBoomCutScene();
ConvoyStop(1);
}
CmdDigout( GetEntity( "reinf_pziv1" ), Q_OVERRIDE);
CmdDigout( GetEntity( "reinf_pziv2" ), Q_OVERRIDE);
CmdDigout( GetEntity( "reinf_pant1" ), Q_OVERRIDE);
CmdMoveToEnt( GetEntity( "reinf_pziv1" ), GetEntity( "pziv_gaz1" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( GetEntity( "reinf_pziv2" ), GetEntity( "pziv_gaz2" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( GetEntity( "reinf_pant1" ), GetEntity( "pant_gaz1" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdTurnToEnt( GetEntity( "reinf_pziv1" ), GetEntity( "dasbridge" ) , Q_ENQUEUE);
CmdTurnToEnt( GetEntity( "reinf_pziv2" ), GetEntity( "dasbridge" ) , Q_ENQUEUE);
CmdTurnToEnt( GetEntity( "reinf_pant1" ), GetEntity( "dasbridge" ) , Q_ENQUEUE);
CmdDigin( GetEntity( "reinf_pziv1" ), Q_ENQUEUE);
CmdDigin( GetEntity( "reinf_pziv2" ), Q_ENQUEUE);
CmdDigin( GetEntity( "reinf_pant1" ), Q_ENQUEUE);
DeActivateEntity( GetEntity( "nigger2" ));
}
//===========================================================================================INTRO=START
public IntroControl()
{
RemoveEvent( "IntroControl" );
static IntroControlla=0;
static lFowBacaName[166];
switch(IntroControlla)
{
case 0:
{
SetCutScene(true,true,true);
FadeOut(1.0);
TeleportCameraToEnt(GetEntity( "sspanzer" ));
CameraSet(15.0,45.0, 35.0, true)
AddTimerEvent( "IntroGermanz", 1.0, "GameLogic", true );
new DrID:FowBac=CreateFOWBtoEntity(GetEntity( "luftide" ));
GetPropertyString( FowBac, "StringID", 166, lFowBacaName );
}
case 1:
{
CmdUnmount( GetEntity( "vonluck" ), Q_OVERRIDE );
CmdUnmount( GetEntity( "luftwaffe" ), Q_OVERRIDE );
AddTimerEvent( "IntroSevizz", 1.0, "GameLogic", true );
FlakHelyre();
SetPropertyInt( GetEntity( lFowBacaName ), "Team", 0 );
}
case 2:
{
DeActivateEntity( GetEntity( "vonluck" ));
HideEntity( GetEntity( "vonluck" ) );
DeActivateEntity( GetEntity( "luftwaffe" ));
HideEntity( GetEntity( "luftwaffe" ) );
MapInitiale();
SetCutScene(false);
if(gElozopalya)
AddTimerEvent( "GimmeMoreAir", 5.0, "GameLogic", true);
}
}
IntroControlla++;
}
public GimmeMoreAir()
{
RemoveEvent( "GimmeMoreAir" );
Pofazz(07);
GiveAirRecon(gPlayerTeam);
GiveAirRecon(gPlayerTeam);
GiveAirRecon(gPlayerTeam);
GiveAirStrike(gPlayerTeam);
GiveAirStrike(gPlayerTeam);
GiveAirStrike(gPlayerTeam);
}
public FlakHelyre()
{
new Flakz[4][10]={{"flak1"},{"flak2"},{"flak3"},{"flak4"}};
new FlakzPre[4][20]={{"flak1preplace"},{"flak2preplace"},{"flak3preplace"},{"flak4preplace"}};
new FlakzPlace[4][20]={{"flak1place"},{"flak2place"},{"flak3place"},{"flak4place"}};
new cik;
new DrID:AktEnt;
for(cik=0;cik<4;cik++)
{
AktEnt=GetEntity( Flakz[cik] )
if(AktEnt!=DrID:0)
{
CmdMoveToEnt( AktEnt, GetEntity( FlakzPre[cik] ), Q_OVERRIDE, MF_TELEPORT );
CmdMoveToEnt( AktEnt, GetEntity( FlakzPlace[cik] ), Q_ENQUEUE, MF_DIRECT );
CmdDigin(AktEnt, Q_ENQUEUE);
}
}
}
//--NEMETZ--
public IntroGermanz()
{
RemoveEvent( "IntroGermanz" );
FadeIn(2.5);
CmdMoveToEnt( GetEntity( "sspanzer" ), GetEntity( "sspanzide" ), Q_OVERRIDE, MF_NONE );
CameraFollow( GetEntity( "sspanzer" ) );
UnitCallEvent(GetEntity( "sspanzer" ), "PanzerOtt");
}
public PanzerOtt(DrID:UndWho)
{
RemoveEvent( "PanzerOtt" );
CmdSetMS( GetEntity( "vonluck" ), Q_OVERRIDE, MS_WALK );
CmdMoveToEnt( GetEntity( "vonluck" ), UndWho, Q_ENQUEUE, MF_TELEPORT );
CmdTurnToEnt( GetEntity( "vonluck" ), GetEntity( "luftide" ), Q_ENQUEUE, TF_TELEPORT );
CmdMoveToEnt( GetEntity( "vonluck" ), GetEntity( "vonluck" ), Q_ENQUEUE, MF_DIRECT );
CmdMoveToEnt( GetEntity( "luftwaffe" ), GetEntity( "luftide" ), Q_OVERRIDE, MF_TELEPORT );
CmdTurnToEnt( GetEntity( "luftwaffe" ), GetEntity( "sspanzer" ), Q_ENQUEUE, TF_TELEPORT );
CmdMoveToEnt( GetEntity( "luftwaffe" ), GetEntity( "luftwaffe" ), Q_ENQUEUE, MF_DIRECT );
UnitCallEvent(GetEntity( "luftwaffe" ), "LuftiOtt");
AddTimerEvent( "RefreshPicsafejz", 0.1, "GameLogic", true );
}
public RefreshPicsafejz()
{
static bool:Lofasz=true;
if(Lofasz)
{
SetPropertyInt(GetComponent( GetEntity( "luftwaffe" ) ,"cHumanController"), "TextureStatus",1);
SetPropertyInt(GetComponent( GetEntity( "vonluck" ) ,"cHumanController"), "TextureStatus",1);
Lofasz=false;
}
else
{
ShowEntity( GetEntity( "vonluck" ) );
SetPropertyInt( GetEntity( "vonluck" ), "Team", 2 );
SetPropertyInt( GetEntity( "vonluck" ), "Team", 1 );
ShowEntity( GetEntity( "luftwaffe" ) );
SetPropertyInt( GetEntity( "luftwaffe" ), "Team", 2 );
SetPropertyInt( GetEntity( "luftwaffe" ), "Team", 1 );
RemoveEvent( "RefreshPicsafejz" );
RefreshFOW();
CameraFollow(GetEntity( "vonluck" ));
AddToGroup( "Talkazz", GetEntity( "luftwaffe" ) );
AddToGroup( "Talkazz", GetEntity( "vonluck" ) );
}
}
public LuftiOtt(DrID:UndWho)
{
RemoveEvent( "LuftiOtt" );
RefreshFOW();
IntroGermanTalk();
}
public IntroGermanTalk()
{
RefreshFOW();
static IGT=0;
switch(IGT)
{
case 0:
{
CameraSpeed(-2.0, 1.0, 1.0, 2.0);
CameraSet(-125.0,35.0, 8.0, false);
CmdTurnToEnt( GetEntity( "vonluck" ), GetEntity( "luftwaffe" ), Q_ENQUEUE);
CmdTurnToEnt( GetEntity( "luftwaffe" ), GetEntity( "vonluck" ), Q_ENQUEUE);
Pofazz(01A);
AddAKEntityEvent( "IntroGermanTalk", ANY_ENTITY, MESSAGE_END );
}
case 1:
{
CameraSpeed(-2.0, 1.5, 1.5, 2.5);
Pofazz(01B);
}
case 2:
{
Pofazz(01C);
}
case 3:
{
Pofazz(01D);
}
case 4:
{
Pofazz(01E);
}
case 5:
{
RemoveEvent( "IntroGermanTalk" );
CmdTurnToEnt( GetEntity( "luftwaffe" ), GetEntity( "luftide" ), Q_OVERRIDE );
CmdMoveToEnt( GetEntity( "luftwaffe" ), GetEntity( "luftide" ), Q_ENQUEUE, MF_DIRECT );
AddTimerEvent( "IntroGermanTalk", 1.0, "GameLogic", true );
}
case 6:
{
SetPropertyInt(GetComponent( GetEntity( "vonluck" ) ,"cHumanController"), "TextureStatus",0);
PlayAnim(GetEntity( "vonluck" ), "AIM");
RemoveEvent( "IntroGermanTalk" );
CmdStop(GetEntity( "luftwaffe" ) , Q_OVERRIDE );
Pofazz(01F);
AddAKEntityEvent( "IntroGermanTalk", ANY_ENTITY, MESSAGE_END );
IGT++;
}
case 8:
{
CmdTurnToEnt( GetEntity( "luftwaffe" ), GetEntity( "vonluck" ), Q_OVERRIDE);
Pofazz(01G);
}
case 9:
{
CmdTurnToEnt( GetEntity( "vonluck" ), GetEntity( "luftwaffe" ), Q_OVERRIDE);
Pofazz(01H);
}
case 10:
{
ShowWeapon(GetEntity( "vonluck" ),false);
Pofazz(01I);
}
case 11:
{
RemoveEvent( "IntroGermanTalk" );
CmdSetMS( GetEntity( "vonluck" ), Q_OVERRIDE, MS_RUN );
CmdMount( GetEntity( "vonluck" ), Q_OVERRIDE, GetEntity( "sspanzer" ) );
AddAKEntityEvent( "IntroGermanTalk", GetEntity( "vonluck" ), UNIT_MOUNTED );
}
case 12:
{
CameraSet(-15.0,45.0, 17.0, false)
SetCameraZoomSpeed(2.0);
CameraFollow( DrID:0 );
CmdMoveToEnt( GetEntity( "luftwaffe" ), GetEntity( "luftide" ), Q_ENQUEUE, MF_DIRECT );
CmdMount( GetEntity( "luftwaffe" ), Q_ENQUEUE, GetEntity( "radiotent" ) );
RemoveEvent( "IntroGermanTalk" );
CmdMoveToEnt( GetEntity( "sspanzer" ) , GetEntity( "odebb" ), Q_OVERRIDE, MF_NONE );
CmdMoveToEnt( GetEntity( "sspanzer" ) , GetEntity( "nedontsoszlop" ), Q_ENQUEUE, MF_NONE );
CmdMoveToEnt( GetEntity( "sspanzer" ) , GetEntity( "hidinnena" ), Q_ENQUEUE, MF_NONE );
CmdMoveToEnt( GetEntity( "sspanzer" ) , GetEntity( "hidinnend" ), Q_ENQUEUE, MF_DIRECT );
UnitCallEvent(GetEntity( "sspanzer" ), "DeactMe", Q_ENQUEUE, 666 );
AddTimerEvent( "IntroControl", 15.0, "GameLogic" , true);
FadeOut(13.0);
}
}
IGT++;
}
public DeactMe(DrID:UndWho)
{
RemoveEntityEvent("DeactMe", UndWho);
DeActivateEntity( UndWho );
}
//--SHEVIZZ--
public IntroSevizz()
{
ResetCameraSpeed();
RemoveEvent( "IntroSevizz" );
FadeIn(2.5);
new Float:SeviSpeed;
switch(GetDifficulty())
{
case 0:
SeviSpeed=5.5;
case 1,2:
SeviSpeed=7.0;
case 3:
SeviSpeed=8.5;
}
SetSpeedInSelector( "sevizz", SeviSpeed);
CameraSet(10.0,75.0, 35.0)
CameraSet(30.0,75.0, 27.0, false)
CameraFollow( GetEntity( "sevi2" ) );
TeleportCameraToEnt(GetEntity( "introstop" ));
FormationMoveToEnt("sevizz", GetEntity( "introstop" ), Q_OVERRIDE, MF_DIRECT);
UnitCallEvent(GetEntity( "sevi1" ), "SeviMegallt", Q_ENQUEUE);
}
public SeviMegallt(DrID:UndWho)
{
new Iterator:iti=Iterate("sevizz");
while(ItNext(iti))
{
DeActivateEntity( ItEntity(iti) );
}
ItStop(iti);
ActivateEntity( GetEntity( "sevi1" ));
RemoveEvent( "SeviMegallt" );
CmdUnmount( GetEntity( "offiszer" ), Q_OVERRIDE );
CameraFollow( GetEntity( "offiszer" ) );
CameraSet(45.0,55.0, 15.0, true)
CameraSet(75.0,55.0, 15.0, false)
CmdMoveToEnt( GetEntity( "offiszer" ), GetEntity( "introoffiszide" ), Q_ENQUEUE, MF_NONE );
UnitCallEvent(GetEntity( "offiszer" ), "OdaertOffiszer", Q_ENQUEUE);
}
public OdaertOffiszer()
{
static OffiszaDuma=0;
switch(OffiszaDuma)
{
case 0:
{
RemoveEvent( "OdaertOffiszer" );
CmdTurnToEnt( GetEntity( "offiszer" ), GetEntity( "offiszer2" ), Q_OVERRIDE );
CmdTurnToEnt( GetEntity( "offiszer2" ), GetEntity( "offiszer" ), Q_OVERRIDE );
Pofazz(02A);
AddAKEntityEvent( "OdaertOffiszer", ANY_ENTITY, MESSAGE_END );
}
case 1:
{
Pofazz(02B);
}
case 2:
{
Pofazz(02C);
}
case 3:
{
Pofazz(02D);
}
case 4:
{
Pofazz(02E);
}
case 5:
{
Pofazz(02F);
}
case 6:
{
Pofazz(02G);
}
case 7:
{
RemoveEvent( "OdaertOffiszer" );
AddTimerEvent( "OffiszerDumaBefejezve",2.0, "GameLogic", true);
}
}
OffiszaDuma++;
}
public OffiszerDumaBefejezve()
{
RemoveEvent( "OffiszerDumaBefejezve" );
CmdMount( GetEntity( "offiszer" ),Q_OVERRIDE, GetEntity( "sevi1" ));
CameraFollow( GetEntity( "offiszer2" ) );
CmdMount( GetEntity( "offiszer2" ),Q_OVERRIDE, GetEntity( "dzsambo" ));
AddAKEntityEvent( "MehetAKonvoj", GetEntity( "offiszer" ), UNIT_MOUNTED );
}
public MehetAKonvoj()
{
RemoveEvent( "MehetAKonvoj" );
CameraFollow( DrID:0 );
IntroControl();
ResetCameraSpeed();
CameraSet(0.0,45.0, 45.0, false)
AddTimerEvent( "IndujjKonvoj", Float:(gKonvoyHalt*2.0), "GameLogic", true );
}
public IndujjKonvoj()
{
RemoveEvent( "IndujjKonvoj" );
new Iterator:iti=Iterate("sevizz");
while(ItNext(iti))
{
ActivateEntity( ItEntity(iti) );
}
ItStop(iti);
SetSpeedInSelector( "sevizz", 5.0 );
ConvoyGo(0);
// AddTimerEvent( "HolAConvoy", 0.5, "GameLogic", true);
iti=Iterate("sevizz");
while (ItNext(iti))
{
AddAKEntityEvent( "SeviAreabanVan", ItEntity(iti), UNIT_AREA_ENTER );
AddAKEntityEvent( "SeviEnemitLatott", ItEntity(iti), UNIT_ENEMY_SEEN );
}
ItStop(iti);
}
//===========================================================================================INTRO===END
//=======BEGINING=OF=OTHER IN GAME CUTSCENES=================================
public BridgeBoomCutScene()
{
static BBC=0;
switch(BBC)
{
case 0:
{
RemoveEvent( "BridgeBoomCutScene" );
CameraSet(15.0, 45.0, 15.0, true)
CameraSpeed( -2.0, 2.0, -2.0, 3.0)
CameraSet(45.0, 45.0, 15.0, false)
SetCutScene(true);
TeleportCameraToEnt( GetEntity( "dasbridge" ));
Pofazz(03A);
AddAKEntityEvent( "BridgeBoomCutScene", ANY_ENTITY, MESSAGE_END );
}
case 1:
{
Pofazz(03B);
}
case 2:
{
ResetCameraSpeed();
CameraSet(95.0, 45.0, 45.0, false);
MoveCameraToEnt( GetEntity( "seggbe11" ));
Pofazz(03C);
}
case 3:
{
new DrID:EztMuta;//seggbe7 legkozelebbi player vehicle
EztMuta=GetNearestEntity(GetEntity( "seggbe7" ),"SelectorTeam2", true, "cVehicle");
if(EztMuta==DrID:0)
EztMuta=GetEntity( "seggbe7" );
CameraSet(2.0, 45.0, 45.0, true);
TeleportCameraToEnt(EztMuta);
Pofazz(03D);
}
case 4:
{
Pofazz(03E);
}
case 5:
{
Pofazz(03F);
}
case 6:
{
Pofazz(03G);
}
case 7:
{
AddTimerEvent( "ContinueConvoy", Float:(gKonvoyHalt*3.0), "GameLogic", true );
SetCutScene(false);
RemoveEvent( "BridgeBoomCutScene" );
}
}
BBC++;
}
//----VONATOS----
public VonatOdakint(DrID:Vonat)
{
new DrID:Hova=GetMsgParamObject();
static Elso=true;
if(Hova==GetEntity( "vonatodakint" ))
{
DeActivateEntity( Vonat );
if(Elso)
{
SetPropertyInt( GetEntity( "vonatbacon" ), "Team", 0);
SetCutScene(false);
CamPosRestore();
Elso=false;
}
}
}
public Haulemall()
{
static Hauler=0;
// ShowShortMessageP1( "Haulemall: %d", Hauler );
if(Hauler==0)
{
new cik;
for(cik=0;cik<5;cik++)
{
ActivateEntity( GetEntity( Wagonz[cik] ));
ShowEntity( GetEntity( Wagonz[cik] ));
}
}
CmdHaul(GetEntity( Wagonz[3-Hauler] ), Q_OVERRIDE, GetEntity( Wagonz[4-Hauler] ));
switch(Hauler)
{
case 0:
{
RemoveEvent( "Haulemall" );
AddTimerEvent( "Haulemall", 0.5, "GameLogic", true);
}
case 3:
{
new cik;
for(cik=0;cik<5;cik++)
{
DeActivateEntity( GetEntity( Wagonz[cik] ));
HideEntity( GetEntity( Wagonz[cik] ));
}
RemoveEvent( "Haulemall" );
}
}
Hauler++;
}
public VonatStart()
{
RemoveEvent( "VonatStart");
new cik;
for(cik=0;cik<5;cik++)
{
ActivateEntity( GetEntity( Wagonz[cik] ));
ShowEntity( GetEntity( Wagonz[cik] ));
MakeInvulnerable(GetEntity( Wagonz[cik] ));
}
MoveForward(GetEntity( Wagonz[0] ), 666.0, _, MF_DIRECT);
AddAKEntityEvent( "VonyitAreaban", GetEntity(Wagonz[0]), UNIT_AREA_ENTER );
}
public VonyitAreaban(DrID:Vonat,DrID:Zarea)
{
if(Zarea==GetEntity( "vonatintrostart" ))//vonatos intro start
{
CamPosStore();
SetCutScene(true,_,false);
SetPropertyInt( GetEntity( "vonatbacon" ), "Team", gPlayerTeam );
TeleportCameraToEnt(GetEntity( "vonatcam" ));
CameraSet(50.0, 45.0, 75.0, true);
CameraSpeed(2.0, 2.0, 2.0, -2.0);
CameraSet(-125.0, 65.0, 35.0, false);
}
if(Zarea==GetEntity( "vonatarea" ))
{
CmdStop( GetEntity( Wagonz[0] ),Q_OVERRIDE );
AddAKEntityEvent( "Lecsereles", GetEntity( Wagonz[0] ), UNIT_STOPPED );
}
if(Zarea==GetEntity( "vonatodakint" ))//vonatosintroend
{
AddTimerEvent( "VonatKintVan", 5.0, "GameLogic", true);
SetCutScene(false,_,false);
ResetCameraSpeed();
CamPosRestore();
SetObjectiveState( "Vonatz", OS_FAILED );
SetPropertyInt( GetEntity( "vonatbacon" ), "Team", 0 );
}
}
public VonatKintVan()
{
new cik;
for(cik=0;cik<5;cik++)
{
DeActivateEntity( GetEntity( Wagonz[cik] ));
HideEntity( GetEntity( Wagonz[cik] ));
}
}
public Lecsereles()
{
RemoveEvent( "Lecsereles" );
new DrID:DasVagon
static bool:elso=true;
if(elso)
{
DasVagon=GetEntity( Wagonz[1]);
elso=false;
}
else
{
DasVagon=GetEntity( Wagonz[2]);
}
Mittomen(DasVagon);
}
public FloorHelyre()
{
RemoveEvent( "FloorHelyre" );
SetPropertyVec3( GetEntity( "wagonfloor" ), "Pos", Float:{0.0,0.0,0.0} );
new Iterator:iti=Iterate("kisvasut");
while(ItNext(iti))
{
ActivateEntity( ItEntity(iti) );
SetPropertyFloat( ItEntity(iti), "RelativeZ", 0.0 );
}
ItStop(iti);
Vonatelore();
}
public Mittomen(DrID:ZieVonat)
{
new Float:VagonDir;
new Float:lTmpVec3[vec3];
new DrID:Tank1;
new DrID:Tank2;
new Float:UjPozicio[vec3];
PlayAnim(ZieVonat, "OFF");
GetPropertyVec3( ZieVonat, "LogicalPos_", lTmpVec3);
VagonDir=GetEntityDir( ZieVonat,DB_X_AXIS )
UjPozicio[vec3:x]=3.163;//3.463
UjPozicio[vec3:y]=0.0;
UjPozicio[vec3:z]=1.121;
RotateVec2(UjPozicio,VagonDir);
AddVec3( UjPozicio, lTmpVec3, UjPozicio );
SetPropertyVec3( GetEntity( "wagonfloor" ), "Pos", lTmpVec3 );
SetPropertyFloat( ZieVonat, "RelativeZ", -1.15 );
Tank1= CreateEntity( "ax_PzIVG", UjPozicio, VagonDir );
UjPozicio[vec3:x]=-3.437; //-3.137
UjPozicio[vec3:y]=0.0;
UjPozicio[vec3:z]=1.121;
RotateVec2(UjPozicio,VagonDir);
AddVec3( UjPozicio, lTmpVec3, UjPozicio );
Tank2= CreateEntity( "ax_PzIVG", UjPozicio, VagonDir );
FillWithCrew(Tank1,1);
MakeInvulnerable(Tank1);
CmdWait( Tank1, Q_OVERRIDE, 1.0 );
TurnCW(Tank1, -90.0, Q_ENQUEUE);
UnitCallEvent(Tank1,"LeAVonatrol");
FillWithCrew(Tank2,1);
MakeInvulnerable(Tank2);
CmdWait( Tank2, Q_OVERRIDE, 1.0 );
TurnCW(Tank2, -90.0, Q_ENQUEUE);
UnitCallEvent(Tank2,"LeAVonatrol");
}
public LeAVonatrol(DrID:IchDone)
{
RemoveEntityEvent( "LeAVonatrol", IchDone );
static LAV_Count=0;
switch(LAV_Count)
{
case 0,1:
MoveForward(IchDone,12.0,Q_OVERRIDE,MF_DIRECT);
case 2,3:
MoveForward(IchDone,6.0,Q_OVERRIDE,MF_DIRECT);
}
LAV_Count++;
AddTimerEvent( "FloorHelyre", 4.5, "GameLogic", true);
UnitCallEvent(IchDone,"MoveDaTankToPos",Q_ENQUEUE);
}
public Vonatelore()
{
RemoveEvent( "Vonatelore" );
static bool:VonatMegegy=true;
if(GetDifficulty()==3&&VonatMegegy)
{
MoveForward(GetEntity( Wagonz[0] ), 15.0, _, MF_DIRECT);
AddAKEntityEvent( "Lecsereles", GetEntity( Wagonz[0] ), UNIT_STOPPED );
VonatMegegy=false;
}
else
{
MoveForward(GetEntity( Wagonz[0] ), 666.0, _, MF_DIRECT);
}
}
public MoveDaTankToPos(DrID:UndWho)
{
static Float:TankWaitTime=2.5;
MakeVulnerable(UndWho);
CmdWait( UndWho, Q_ENQUEUE, TankWaitTime );
CmdMoveToEnt( UndWho, GetEntity( "vontankout" ), Q_ENQUEUE, MF_NONE );
SetBehav2Ent( UndWho, _, FB_FIRE_AT_WILL, _, DB_WRECKSONLY);
if(IsAlive(GetEntity( "dasbridge" )))
{
//konvok10->konvok1
CmdMoveToEnt( UndWho, GetEntity( "konvok10" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvok9" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvok8" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvok7" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvok6" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvok5" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvok4" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvok3" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvok2" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvok1" ), Q_ENQUEUE, MF_ATTACKMOVE );
}
else
{
//kongaz11->konvgaz1
CmdMoveToEnt( UndWho, GetEntity( "konvgaz11" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvgaz10" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvgaz9" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvgaz8" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvgaz7" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvgaz6" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvgaz5" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvgaz4" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvgaz3" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvgaz2" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdMoveToEnt( UndWho, GetEntity( "konvgaz1" ), Q_ENQUEUE, MF_ATTACKMOVE );
}
TankWaitTime+=5.0;
}
//============END=OF=OTHER IN GAME CUTSCENES=================================
public SeviAreabanVan(DrID:UndWho)
{
new DrID:UndWhere=GetMsgParamObject();
if(UndWhere==GetEntity( "konvojarea" ))
{
if(IsAlive(GetEntity( "dasbridge" )))
{
gActConvoy=1;
ResetConvoy(0);
ResetConvoy(1);
ResetConvoy(2);
ConvoyGo(gActConvoy);
}
else
{
gActConvoy=2;
ResetConvoy(0);
ResetConvoy(1);
ResetConvoy(2);
BridgeBoomCutScene()
ConvoyStop(0);
}
DeActivateEntity( UndWhere );
RemoveEvent( "SeviAreabanVan" );
}
}
public SeviEnemitLatott(DrID:UndWho)
{
// ShowShortMessage( "Chevrolet Driver: ENEMY IN SIGHT!!!" );
ConvoyStop(gActConvoy);
gConvoyStartDelays[gActConvoy]=0.0;
AddTimerEvent( "ContinueConvoy", gKonvoyHalt, "GameLogic", true );
}
public ContinueConvoy()
{
RemoveEvent( "ContinueConvoy" );
ConvoyGo(gActConvoy);
}
public MeghalszGeci(DrID:UndWho)
{
RemoveEntityEvent( "MeghalszGeci", UndWho );
if(IsAlive(UndWho))
KillEntity(UndWho)
}
public KiertSevi(DrID:UndWho)
{
RemoveEntityEvent( "KiertSevi", UndWho );
gKintSevi++;
DeActivateEntity( UndWho );
MakeInvulnerable( UndWho );
RemoveFromGroup( "sevizz", UndWho );
new lTmpStr[66];
Int2Str( gKintSevi, lTmpStr, 66, "" );
ConcatString( lTmpStr, 66, "#iMS07_MSG001#", lTmpStr );
SetShortInfo(lTmpStr);
CheckOurPrimary();
if(gKintSevi>=gMinSevi)
{
SetObjectiveState( "sevroz", OS_COMPLETED );
}
}
public SevikOdakint()
{
if(IsAlive(GetEntity( "dasbridge" )))
{
AddObjective( "BridgeHold", OT_PRIMARY, "#iMS07_PS02A#", "#iMS07_PL02A#", OS_IN_PROGRESS );
Pofazz(04A);
Pofazz(04B);
}
else
{
AddObjective( "BridgeHold", OT_PRIMARY, "#iMS07_PS02B#", "#iMS07_PL02B#", OS_IN_PROGRESS );
Pofazz(05A);
Pofazz(05B);
}
RemoveEvent( "SevikOdakint" );
SendBigReinf2Playa();
AddTimerEvent( "SendBigReinf2AI", gReinfTajm, "GameLogic", true );
new KantDan=floatround(gReinfTajm+180.0);
if(IsAlive(GetEntity( "dasbridge" )))
{
KantDan+=180;
}
SetCountDown( KantDan );
AddAKEntityEvent( "GameIsAboutDone", ANY_ENTITY, COUNTDOWN_DONE );
}
public CheckOurPrimary()
{
new PalyanLevok=CountLivingInSelector( "sevizz" );
if(PalyanLevok==0)
{
if(gKintSevi>=gMinSevi)
{
AddTimerEvent( "SevikOdakint", 2.0, "GameLogic", true );
}
else
{
AddTimerEvent( "GameOverMan", 2.0, "GameLogic", true );
SetObjectiveState( "sevroz", OS_FAILED );
SetCutScene(true);
}
}
if((PalyanLevok+gKintSevi)<gMinSevi)
{
AddTimerEvent( "GameOverMan", 2.0, "GameLogic", true );
SetObjectiveState( "sevroz", OS_FAILED );
SetCutScene(true);
}
}
public GameIsAboutDone()
{
SetCutScene(true);
if(IsPlayer( GetEntity( "hq1" )))
{
Pofazz(06A);
SetObjectiveState( "BridgeHold", OS_COMPLETED );
AddAKEntityEvent( "GameDoneMan", ANY_ENTITY, MESSAGE_END,2.0 );
}
else
{
Pofazz(06B);
SetObjectiveState( "BridgeHold", OS_FAILED );
AddAKEntityEvent( "GameOverMan", ANY_ENTITY, MESSAGE_END, 2.0 );
SetCutScene(true);
}
}
//======================================================================================================
public TeamElimSucceed()
{
new Team=GetMsgParamInt();
// ShowShortMessageP1( "Teamelim: %d", Team );
if(Team==123)
{
if(GetObjectiveState( "sevroz" )==OS_COMPLETED)
{
SetObjectiveState( "BridgeHold", OS_FAILED );
}
else
{
SetObjectiveState( "sevroz", OS_FAILED );
}
SetCutScene(true);
GameOverMan();
}
if(Team==666&&GetDifficulty()==0)
{
Reinforcement( "easyextra", GetEntity( "playad" ), GetEntity( "playaa" ) );
new Iterator:iti=Iterate("iziextra");
while(ItNext(iti))
{
SetPropertyString( ItEntity(iti), "Nationality", "French" );
}
}
}
//======================================================================================================
// Add your functions here:
public YouReDaRealNigger()
{
static Float:Lofasz=1.0;
new Float:lTmpVec3[vec3];
GetPropertyVec3( GetEntity( "nigger0" ), "LogicalPos_", lTmpVec3 );
lTmpVec3[vec3:x]+=Lofasz;
SetPropertyVec3( GetEntity( "nigger0" ), "Pos", lTmpVec3 );
if(Lofasz==1.0)
{
Lofasz=-1.0;
}
else
{
Lofasz=1.0;
}
new Iterator:iti=Iterate("nigger0");
new DrID:Ureske;
while(ItNext(iti))
{
Ureske=ItEntity(iti);
if(IsInstanceOf( Ureske, GetClassID( "cVehicle" ) )&&!IsWreck(Ureske)&&(GetPropertyInt( Ureske, "Team" )==0))
{
DamageEntity( Ureske, 15.0, 49 );
}
}
new Iterator:iti2;
GetPropertyVec3( GetEntity( "nigger2" ), "LogicalPos_", lTmpVec3 );
lTmpVec3[vec3:x]+=Lofasz;
SetPropertyVec3( GetEntity( "nigger2" ), "Pos", lTmpVec3 );
iti=Iterate("nigger2");
iti2=Iterate("sevizz");
new DrID:ActSevi;
while(ItNext(iti2))
{
ActSevi=ItEntity(iti2)
if(IsInSelector( ActSevi, "nigger2" ))
{
iti=Iterate("nigger2");
while(ItNext(iti))
{
Ureske=ItEntity(iti);
if(!IsInSelector( Ureske, "sevizz" )&&!IsMounted(Ureske))
{
if(OdebbDuma)
{
Pofazz(08);
OdebbDuma=false;
}
CmdDigout(Ureske, Q_OVERRIDE)
CmdMoveToEnt( Ureske, GetEntity( "odebb" ), Q_CYCLE, MF_NONE );
}
}
}
}
}
public DeactivateMePlease(DrID:UndWho)
{
RemoveEntityEvent("DeactivateMePlease",UndWho);
DeActivateEntity( UndWho );
}
public SendBigReinf2Playa()
{
RemoveEvent( "SendBigReinf2Playa" );
Reinforcement( "players", GetEntity( "playad" ), GetEntity( "playaa" ));
new Iterator:iti=Iterate("players");
while(ItNext(iti))
{
SetPropertyString( ItEntity(iti), "Nationality", "Canadian" );
}
DropPara2Ent(gPlayerTeam, "ejtosok", GetEntity( "seggbe7" ), ARF_DONT_CHECK_LIMIT);
iti=Iterate("ejtosok");
while(ItNext(iti))
{
SetPropertyString( ItEntity(iti), "Nationality", "Canadian" );
}
}
public SendBigReinf2AI()
{
RemoveEvent( "SendBigReinf2AI" );
Reinforcement( "attack_felso", GetEntity( "hidinnend"), GetEntity( "hidinnena" ) );
CmdGroupMoveToEnt( "attack_felso", GetEntity( "seggbe7" ), Q_ENQUEUE, MF_ATTACKMOVE );
Reinforcement( "attack_also", GetEntity( "hidonnand" ), GetEntity( "hidonnand" ) );
if(IsAlive(GetEntity( "dasbridge" )))
{
CmdGroupMoveToEnt( "attack_also", GetEntity( "seggbe7" ), Q_ENQUEUE, MF_ATTACKMOVE );
}
else
{
CmdGroupMoveToEnt( "attack_also", GetEntity( "seggbe1" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdGroupMoveToEnt( "attack_also", GetEntity( "seggbe2" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdGroupMoveToEnt( "attack_also", GetEntity( "seggbe3" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdGroupMoveToEnt( "attack_also", GetEntity( "seggbe4" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdGroupMoveToEnt( "attack_also", GetEntity( "seggbe5" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdGroupMoveToEnt( "attack_also", GetEntity( "seggbe6" ), Q_ENQUEUE, MF_ATTACKMOVE );
CmdGroupMoveToEnt( "attack_also", GetEntity( "seggbe7" ), Q_ENQUEUE, MF_ATTACKMOVE );
}
if(GetDifficulty()==3)
{
Reinforcement( "bigfuka", GetEntity( "tankzd"), GetEntity( "tankza" ) );
CmdGroupMoveToEnt( "attack_felso", GetEntity( "seggbe7" ), Q_ENQUEUE, MF_ATTACKMOVE );
}
static bool:ElsoTamadas=true;
if(ElsoTamadas)
{
ActivateEntity( GetEntity( "sspanzer" ) );
CmdMoveToEnt( GetEntity( "sspanzer" ) , GetEntity( "seggbe7" ), Q_ENQUEUE, MF_ATTACKMOVE );
AddTimerEvent( "CheckForSecondWave", 200.0, "GameLogic", true);
ElsoTamadas=false;
}
}
public CheckForSecondWave()
{
RemoveEvent( "CheckForSecondWave" );
if(IsPlayer( GetEntity( "hq1" )))
{
SendBigReinf2AI();
}
}
//======================================================================================================
public ObjectiveChanged()
{
// Check objectives here
}
public GameOverMan()
{
RemoveEvent( "GameOverMan" );
AddDebriefing("#iMISSION_DB_F#");
EndMission( MS_FAILED );
}
public GameDoneMan()
{
if(GetObjectiveState( "Vonatz" )==OS_COMPLETED)
{
SetGlobalVariable("gvMS07_TrainStop",1);
}
else
{
SetGlobalVariable("gvMS07_TrainStop",0);
}
RemoveEvent( "GameDoneMan" );
AddDebriefing("#iMISSION07_DB_P#");
if(GetObjectiveState( "Vonatz" )==OS_COMPLETED)
{
AddDebriefing("#iMISSION07_DB_H#");
}
EndMission( MS_ACCOMPLISHED );
}
//======================================================================================================
public SzonyegBombazas()
{
SetCutScene(true,false);
CamPosStore();
SetPropertyInt(GetEntity( "b17area" ), "Team", gPlayerTeam );
TeleportCameraToEnt(GetEntity( "b17area" ));
CameraSet(45,90,65, true)
ActivateEntity( GetEntity( "as1" ) );
ActivateEntity( GetEntity( "as2" ) );
ActivateEntity( GetEntity( "as3" ) );
ActivateEntity( GetEntity( "as4" ) );
CmdAttack( GetEntity( "as1" ), Q_OVERRIDE, GetEntity( "astarget1" ), AF_FORCE );
CmdAttack( GetEntity( "as2" ), Q_OVERRIDE, GetEntity( "astarget2" ), AF_FORCE );
CmdAttack( GetEntity( "as3" ), Q_OVERRIDE, GetEntity( "astarget3" ), AF_FORCE );
CmdAttack( GetEntity( "as4" ), Q_OVERRIDE, GetEntity( "astarget4" ), AF_FORCE );
AddAKEntityEvent( "MenekuljetekBuzik", GetEntity( "as1" ), UNIT_AREA_ENTER);
AddAKEntityEvent( "NaHolJar", GetEntity( "as1" ), UNIT_AREA_ENTER);
AddAKEntityEvent( "NaHolJar", GetEntity( "as2" ), UNIT_AREA_ENTER);
AddAKEntityEvent( "NaHolJar", GetEntity( "as3" ), UNIT_AREA_ENTER);
AddAKEntityEvent( "NaHolJar", GetEntity( "as4" ), UNIT_AREA_ENTER);
AddTimerEvent( "robajmiegymas", 2.0, "GameLogic", true);
}
public robajmiegymas()
{
static Robaj=0;
switch(Robaj)
{
case 0:
{
new DrID:Megrazo=CreateEntity2Ent("particle_camshake_slow", GetEntity( "b17area" ));
SetPropertyString( Megrazo, "StringID", "megrazo1234" );
}
case 1:
{
PlaySound("Sounds\\Game\\Others\\B52 Planes 10sec.wav");
RemoveEvent( "robajmiegymas" );
Robaj=0;
}
}
Robaj++;
}
public NaHolJar(DrID:UndWho)
{
new DrID:UndHova=GetMsgParamObject();
if(UndHova==GetEntity( "repzifel" )&&IsInSelector( UndWho, "bombazok" ))
{
new DrID:cPC=GetComponent( UndWho, "cPlaneController");
if(DrID:0==cPC)
{
return;
}
SetPropertyFloat( cPC, "MinHeight", 56.0 );
SetPropertyFloat( cPC, "MaxHeight", 56.0 );
SetPropertyFloat( cPC, "DefaultHeight", 56.0 );
SetPropertyFloat( cPC, "ZAcceleration", 60.0 );
SetPropertyFloat( UndWho, "RelativeZ", 0.0 );
// new Float:lTmpVec3[vec3];
// GetPropertyVec3( UndWho, "LogicalPos_", lTmpVec3 );
// lTmpVec3[vec3:z]=35.0;
// GetPropertyVec3( UndWho, "Pos", lTmpVec3 );
// CmdMove( UndWho, Q_OVERRIDE, lTmpVec3, MF_TELEPORT );
// GetPropertyVec3( UndWho, "Pos", lTmpVec3 );
// SetPropertyFloat( UndWho, "RelativeZ", 0.0 );
// GetPropertyVec3( UndWho, "Pos", lTmpVec3 );
if(UndWho==GetEntity( "as1" ))
{
CmdAttack( GetEntity( "as1" ), Q_ENQUEUE, GetEntity( "astarget1" ), AF_FORCE );
}
if(UndWho==GetEntity( "as2" ))
{
CmdAttack( GetEntity( "as2" ), Q_ENQUEUE, GetEntity( "astarget2" ), AF_FORCE );
}
if(UndWho==GetEntity( "as3" ))
{
CmdAttack( GetEntity( "as3" ), Q_ENQUEUE, GetEntity( "astarget3" ), AF_FORCE );
}
if(UndWho==GetEntity( "as4" ))
{
CmdAttack( GetEntity( "as4" ), Q_ENQUEUE, GetEntity( "astarget4" ), AF_FORCE );
}
AddAKEntityEvent( "ZSpeedZero", UndWho, UNIT_AREA_EXIT );
}
if(UndHova==GetEntity( "b17kint" )&&IsInSelector( UndWho, "bombazok" ))
{
HideEntity( UndWho );
DeActivateEntity( UndWho );
static bool:Pina=true;
if(Pina)
{
SetObjectiveState( "AAKill", OS_COMPLETED );
SetCutScene(false,false);
DeActivateEntity(GetEntity( "megrazo2345" ) );
AddTimerEvent( "CamPosRestoreLocal", 4.5,"GameLogic", true );
Pina=false;
}
}
}
public ZSpeedZero(DrID:UndWho)
{
new DrID:UndHova=GetMsgParamObject();
if(UndHova==GetEntity( "repzifel" )&&IsInSelector( UndWho, "bombazok" ))
{
new DrID:cPC=GetComponent( UndWho, "cPlaneController");
if(DrID:0==cPC)
{
return;
}
SetPropertyFloat( cPC, "MinHeight", 56.0 );
SetPropertyFloat( cPC, "MaxHeight", 56.0 );
SetPropertyFloat( cPC, "DefaultHeight", 56.0 );
SetPropertyFloat( cPC, "ZSpeed", 0.0 );
SetPropertyFloat( cPC, "ZAcceleration", 0.0 );
SetPropertyFloat( UndWho, "RelativeZ", 0.0 );
}
}
public CamPosRestoreLocal()
{
SetPropertyInt(GetEntity( "b17area" ), "Team", 0 );
RemoveEvent( "CamPosRestoreLocal" );
CamPosStore(false);
}
public MenekuljetekBuzik(DrID:UndWho)
{
new DrID:UndHova=GetMsgParamObject();
if(UndHova==GetEntity( "mindenkimenekul" )&&IsInSelector( UndWho, "bombazok" ))
{
TeleportCameraToEnt(GetEntity( "astarget1" ));
CameraSet(-45, 45,35, true)
RemoveEvent( "MenekuljetekBuzik" );
CmdGroupUnmount( "axismenekul", Q_OVERRIDE, UMTF_UNMOUNT_ALL );
FormationMoveToEnt("axismenekul",GetEntity( "idemenekulj" ),Q_ENQUEUE,MF_NONE);
DestructEntity( GetEntity( "megrazo1234" ) );
AddTimerEvent( "robajmiegymas",1.0, "GameLogic", true);
}
}