home *** CD-ROM | disk | FTP | other *** search
- -- Army of invaders on the horizon
- function SquadCinematic()
-
- local CinemaInvader = G.CreateAt( "Squad", Vector3( 130, 0, 130 ) );
- Camera.CinemaMove( Vector3(80,30,80), Vector3(146,5,150), 2 );
- --Camera.CinemaLookAt( CinemaInvader );
-
- CinemaInvader.TurnOffAI()
-
- CinemaInvader.SetDirection( Vector3( -1,0,-1 ) );
-
- -- Spiker appears:
- G.SayPhraseScript( "Ten hut!" , CinemaInvader );
-
- local CinemaInvader2 = G.CreateAt( "Basic", Vector3( 115, 0, 115 ) );
- local CinemaInvader3 = G.CreateAt( "Basic", Vector3( 125, 0, 120 ) );
- local CinemaInvader4 = G.CreateAt( "Basic", Vector3( 120, 0, 115 ) );
- local CinemaInvader8 = G.CreateAt( "Basic", Vector3( 115, 0, 120 ) );
- local CinemaInvader9 = G.CreateAt( "Basic", Vector3( 120, 0, 125 ) );
- local CinemaInvader5 = G.CreateAt( "Miner", Vector3( 110, 0, 110 ) );
- local CinemaInvader15 = G.CreateAt( "Miner", Vector3( 100, 0, 110 ) );
- local CinemaInvader6 = G.CreateAt( "Spiker", Vector3( 110, 0, 115 ) );
- local CinemaInvader7 = G.CreateAt( "Spiker", Vector3( 115, 0, 110 ) );
- local CinemaInvader10 = G.CreateAt( "Driller", Vector3( 115, 0, 105 ) );
- local CinemaInvader11 = G.CreateAt( "Driller", Vector3( 105, 0, 115 ) );
- local CinemaInvader12 = G.CreateAt( "Ninja", Vector3( 110, 0, 120 ) );
- local CinemaInvader13 = G.CreateAt( "Ninja", Vector3( 120, 0, 110 ) );
- local CinemaInvader14 = G.CreateAt( "Kamikaze", Vector3( 100, 0, 100 ) );
-
- CinemaInvader.TurnOffAI();
- CinemaInvader2.TurnOffAI();
- CinemaInvader3.TurnOffAI();
- CinemaInvader4.TurnOffAI();
- CinemaInvader5.TurnOffAI();
- CinemaInvader6.TurnOffAI();
- CinemaInvader7.TurnOffAI();
- CinemaInvader8.TurnOffAI();
- CinemaInvader9.TurnOffAI();
- CinemaInvader10.TurnOffAI();
- CinemaInvader11.TurnOffAI();
- CinemaInvader12.TurnOffAI();
- CinemaInvader13.TurnOffAI();
- CinemaInvader14.TurnOffAI();
- CinemaInvader15.TurnOffAI();
-
- GameWait(3)
-
- G.SayPhraseScript( "Today we fight" , CinemaInvader );
-
- TraitorTalk( "Look! All the invaders are gathering on the hill." );
-
- GameWait(1)
- G.SayPhraseScript( "We can win" , CinemaInvader );
- GameWait(1)
- G.SayPhraseScript( "Victory is ours" , CinemaInvader );
- GameWait(1)
- G.SayPhraseScript( "We will win" , CinemaInvader );
- GameWait(1)
- G.SayPhraseScript( "Destroy the \nTower!" , CinemaInvader );
- GameWait(1)
- G.SayPhraseScript( "Defeat the \nHand!" , CinemaInvader );
-
- TraitorTalk( "Squad Leaders? They're hardened troops that have survived an invasion." );
-
- GameWait(1)
- G.SayPhraseScript( "We have fought" , CinemaInvader );
- GameWait(1)
- G.SayPhraseScript( "long and hard" , CinemaInvader );
- GameWait(1)
- G.SayPhraseScript( "but know today" , CinemaInvader );
- GameWait(1)
- G.SayPhraseScript( "we shall \ntriumph!" , CinemaInvader );
- GameWait(3)
-
-
- G.SayPhraseScript( "Fall in Troops!" , CinemaInvader );
-
- TraitorTalk( "Squad leaders increase other invaders' powers! Watch out!" );
- GameWait(3)
-
-
- TraitorTalk( "This isn't going to be easy ..." );
-
- G.SayPhraseScript( "Forward March!" , CinemaInvader );
-
- CinemaInvader.TurnOnAI()
- CinemaInvader2.TurnOnAI();
- CinemaInvader3.TurnOnAI();
- CinemaInvader4.TurnOnAI();
- CinemaInvader5.TurnOnAI();
- CinemaInvader6.TurnOnAI();
- CinemaInvader7.TurnOnAI();
- CinemaInvader8.TurnOnAI();
- CinemaInvader9.TurnOnAI();
- CinemaInvader10.TurnOnAI();
- CinemaInvader11.TurnOnAI();
- CinemaInvader12.TurnOnAI();
- CinemaInvader13.TurnOnAI();
- CinemaInvader14.TurnOnAI();
- CinemaInvader15.TurnOnAI();
-
- GameWait(1)
- end
-
-
-
- --Common Level Start Code
- function LevelStartup()
-
- G.Create( "MenuData/HudCog.xml" );
- G.Create( "Data/GameCamera.xml" );
- G.Create( "Data/CursorCog.xml" );
-
- MainLevel = G.Create( "Data/Levels/Campaign9.xml" );
- MainLevel.CreateLevel();
-
- G.SetInvSpeed( 20 );
- HUD.EnterLevel();
- G.SetGameState( InLevel );
- G.SetPoints( 0 );
-
- G.SetLightTime( 5 );
- G.PostP( "None" );
- --TraitorTalk(" ");
-
- -- gameStartTime = 10000000;
-
- HUD.Message( "VictoryCondition" , "SetText", "Squash the Squad Leader Invasion!" ); -- Kill 500 Invaders
- HUD.Message( "LossCondition" , "SetText", "If the Tower falls you lose." );
-
- TraitorCanBeHidden = true
-
- end
-
- LevelStartup()
-
- function LevelIntro()
-
- local tempPos = Tower.GetPosition()
- Camera.LookAtPosition( tempPos )
-
- gameStartTime = GameTime;
-
- ColorTextPopup( "Level 9: Final Front", Color(1,1,1,1) )
-
- G.DisableTrapAll()
-
- G.EnableTrap("wall");
- G.EnableTrap("bomb");
- G.EnableTrap("hammer");
- G.EnableTrap("fan");
- G.EnableTrap("spring");
- G.EnableTrap("zapper");
- G.EnableTrap("vortex");
- G.EnableTrap("axe");
- G.EnableTrap("poison");
- G.EnableTrap("flame");
- G.EnableTrap("bulb");
- G.EnableTrap("laser");
-
- DisableTraitor()
- GameWait(1.5)
-
- end
-
- function LevelSequence()
-
- -- 1st Have a tower and some walls and let the Basic guys attack.
- Traitor.SetGuiPosition( "TraitorWindow" , Vector3(0.6, -0.5, 1) );
-
- -- Set the spawn points
-
- SpawnPoints = {}
- --SpawnPoints[1] =
-
- -- Start Spawning the guys
- StartWave = createSpawnStruct()
-
- StartWave.Prob.Basic = 1.5;
- StartWave.Prob.Miner = 2.5;
- StartWave.Prob.Squad = 2.0;
-
- StartWave.SpawnSpeed = 3.0;
- StartWave.MaxSpawn = 15;
- StartWave.TotalSpawn = 25;
- StartWave.GroupPercent = 0.45;
- StartWave.GroupSize = 1;
- StartWave.WhereToSpawn = SmallCircleAroundTower
-
- MainWave = createSpawnStruct()
-
- MainWave.Prob.Basic = 2.0;
- MainWave.Prob.Miner = 2.0;
- MainWave.Prob.Stacker = 1.5;
- MainWave.Prob.Driller = 1.0;
- MainWave.Prob.Ninja = 2.0;
- MainWave.Prob.Kamikaze = 1.5;
- MainWave.Prob.Psychic = 1.0;
- MainWave.Prob.Squad = 0.5;
- MainWave.Prob.Spiker = 1.0;
- MainWave.Prob.Bomber = 1.0;
-
- MainWave.SpawnSpeed = 2.0;
- MainWave.MaxSpawn = 30;
- MainWave.TotalSpawn = 50;
- MainWave.GroupPercent = 0.15;
- MainWave.GroupSize = 1;
- MainWave.WhereToSpawn = SmallCircleAroundTower
-
- TraitorTalk("I think the Invaders have met their match.");
- GameWait(7)
- TraitorTalk("If we can survive today, I think we'll be in the clear.");
- GameWait(6)
- TraitorTalk("They'll be throwing everything at us now...");
- GameWait(2)
-
- StartCinematic()
- SquadCinematic()
- EndCinematic()
-
- InvaderTextPopup( "Squad Leader" );
- GameWait(2)
-
- -- TraitorTalk("They mean business. They've brought in the Squad Leaders.")
- -- GameWait(6)
- -- TraitorTalk("These invaders are able to rally nearby invaders and form up squads.")
- -- GameWait(6)
- -- TraitorTalk("This enables them to attack a single point en masse.")
- -- GameWait(5)
- TraitorTalk("I have a few more traps for 'ya. Just hold out while I get them ready.")
- G.EarnPoints(500)
- GameWait(6)
-
- TraitorTalk("Here they come!");
- GameWait(3)
- AddWave( "StartAttack", StartWave )
- G.SetMaxKills( 40 )
-
- InvadersKilledWait(40)
- StopWave( "StartAttack" )
-
- GameWait(3)
- TrapTextPopup("Satellite Laser")
- G.EarnPoints( 200 )
- G.EnableTrap("satellite");
-
- TraitorTalk("Uplink established! You now have access to the satellite laser!")
- GameWait(5)
- TraitorTalk("After deploying the receiver, you will be able to aim the laser at anywhere on the map.")
- GameWait(7)
- TraitorTalk("Each time it fires it costs money, so be sure to watch your funds while you use it!")
- GameWait(7)
- TraitorTalk("You can get rid of the laser by pressing the right mouse button at any time, or if the receiver is destroyed.")
- GameWait(10)
-
- AddWave( "MainAttack", MainWave)
- G.SetMaxKills( 90 )
- InvadersKilledWait(90) --75
- StopWave( "MainAttack" )
-
- G.Create( "Data/LightSnowCell.xml" ); -- START SNOWING:
-
- TraitorTalk("Great, now it's started snowing!")
- GameWait(4)
-
-
- -- TraitorTalk("Alright, I have the last trap ready!")
- -- GameWait(3)
-
- -- TrapTextPopup("Missile")
- -- G.EarnPoints( 300 )
- -- G.EnableTrap("missile");
- -- GameWait(3)
-
- -- TraitorTalk("All the codes are set. The missiles are awaiting your orders.")
- -- GameWait(5)
- -- TraitorTalk("Place the silo where you want the missile to hit.")
- -- GameWait(4)
- -- TraitorTalk("And be sure to put it far away from the base! It'll hit them and us!!!")
- -- GameWait(6)
- -- TraitorTalk("Well, I think I've helped you as much as I can. Good Luck!")
- -- GameWait(10)
-
- G.SetMaxKills( 190 )
- MainWave.TotalSpawn = 100
- AddWave( "MainAttack", MainWave )
- InvadersKilledWait( 190 ) --175
-
- TraitorTalk("Quick! Build up our defenses!!")
-
- G.EarnPoints( 200 )
- GameWait(30)
-
- TraitorTalk("Here comes another wave. Brace yourself!")
- GameWait(6)
-
- G.SetMaxKills( 300 ) --300
- MainWave.TotalSpawn = 110
- MainWave.SpawnSpeed = 3.0
-
- WaitForTimeOrKills( 5000, 300 )
-
- TraitorTalk("I can see them coming. There's so many...")
- GameWait(7)
- TraitorTalk("Set up what you can, although I don't think we'll survive this.")
- GameWait(7)
- G.EarnPoints( 200 )
- TraitorTalk("Here, this is the last of the emergency funds.")
- GameWait(20)
- TraitorTalk("Here they come. I believe this is the end...")
- GameWait(10)
-
- G.SetMaxKills( 500 )
- MainWave.Prob.Kamikaze = 4
- MainWave.TotalSpawn = 200
- MainWave.SpawnSpeed = 4.0
-
- InvadersKilledWait(490)
- TraitorTalk("I think the attack is dying down...")
- GameWait(4)
-
- InvadersKilledWait(500)
-
- TraitorTalk("Congratulations! We survived!!!!")
- GameWait(5)
-
- TraitorTalk("That was the main invasion force, there won't be many invaders left now.")
- GameWait(7)
-
- G.SetGameState( Victory );
-
- TraitorTalk("They'll probably launch one more attack, but I've got something special planned for them ...")
- GameWait(7)
-
- --[[
- TraitorTalk("That looks like the last of them. Won't be seeing much of them anytime soon.")
- GameWait(8)
- TraitorTalk("Whew, we've been through a lot together, don't you agree?")
- GameWait(6)
- TraitorTalk("It's nice to know that I'm on the winning side!")
- GameWait(5)
- TraitorTalk("As a show of gratitude, I promise to be your loyal friend and ally...")
- GameWait(7)
- DisableTraitor()
- GameWait(3)
-
- TraitorTalk("...for now.")
- GameWait(3)
- ]]--
- -- G.SetGameState( Victory );
-
- end
-
- levelRoutine = coroutine.create(LevelIntro);
-
- GMain["LevelUpdate"] = LevelUpdate;
-