--The tutorial for Meteor Madness SetShowCursor(false); ShowStaticDialog("CDR NOVAH", "Good evening, LT. We don't have much time so I'll keep it short. We have received a distress signal \nfrom a freighter in sector 7G.\n\n(Press the space bar to continue)", "Content/Portraits/CDRNovah", null, "BottomRight"); WSILogo = LoadTexture("Content/General/WSIMissionBriefSlide"); WSISlide = CreateEntity(WSILogo); WSISlide.X = ScreenWidth(0.50); WSISlide.Y = ScreenHeight(0.375); WSISlide.Z = 1; WSISlide.Width = ScreenWidth(1); WSISlide.Height = ScreenHeight(0.75); WaitFor("next"); WSISlide.Visible = false; --Freighter flying scene freighterImage = LoadTexture("Content/MiniGames/FreighterIcon"); freighter = CreateEntity(freighterImage); freighter.X = -1 * ScreenWidth(0.10); freighter.Y = ScreenHeight(0.6); freighter.Width = ScreenWidth(0.05615); freighter.Height = ScreenHeight(0.01); freighter.dX = ScreenWidth(0.11); starImage = LoadTexture("Content/General/White"); star1 = CreateEntity(starImage); star1.X = ScreenWidth(0.10); star1.Y = ScreenHeight(0.50); star2 = CreateEntity(starImage); star2.X = ScreenWidth(0.22); star2.Y = ScreenHeight(0.24); star3 = CreateEntity(starImage); star3.X = ScreenWidth(0.29); star3.Y = ScreenHeight(0.68); star4 = CreateEntity(starImage); star4.X = ScreenWidth(0.34); star4.Y = ScreenHeight(0.31); star5 = CreateEntity(starImage); star5.X = ScreenWidth(0.36); star5.Y = ScreenHeight(0.95); star6 = CreateEntity(starImage); star6.X = ScreenWidth(0.45); star6.Y = ScreenHeight(0.46); star7 = CreateEntity(starImage); star7.X = ScreenWidth(0.66); star7.Y = ScreenHeight(0.87); star8 = CreateEntity(starImage); star8.X = ScreenWidth(0.72); star8.Y = ScreenHeight(0.46); star9 = CreateEntity(starImage); star9.X = ScreenWidth(0.88); star9.Y = ScreenHeight(0.16); star10 = CreateEntity(starImage); star10.X = ScreenWidth(0.43); star10.Y = ScreenHeight(0.24); star11 = CreateEntity(starImage); star11.X = ScreenWidth(0.83); star11.Y = ScreenHeight(0.28); star12 = CreateEntity(starImage); star12.X = ScreenWidth(0.24); star12.Y = ScreenHeight(0.76); star13 = CreateEntity(starImage); star13.X = ScreenWidth(0.38); star13.Y = ScreenHeight(0.68); star14 = CreateEntity(starImage); star14.X = ScreenWidth(0.46); star14.Y = ScreenHeight(0.76); star15 = CreateEntity(starImage); star15.X = ScreenWidth(0.55); star15.Y = ScreenHeight(0.21); star16 = CreateEntity(starImage); star16.X = ScreenWidth(0.78); star16.Y = ScreenHeight(0.34); star17 = CreateEntity(starImage); star17.X = ScreenWidth(0.81); star17.Y = ScreenHeight(0.59); star18 = CreateEntity(starImage); star18.X = ScreenWidth(0.99); star18.Y = ScreenHeight(0.76); ShowStaticDialog("FREIGHTER PILOT", "Mayday, Mayday! This is maritime vessel FV-047AF. I am being pursued and need help!\n\n(Press the space bar to continue)", null, null, "TopLeft"); WaitFor("next"); DestroyEntity(freighter); DestroyEntity(star1); DestroyEntity(star2); DestroyEntity(star3); DestroyEntity(star4); DestroyEntity(star5); DestroyEntity(star6); DestroyEntity(star7); DestroyEntity(star8); DestroyEntity(star9); DestroyEntity(star11); DestroyEntity(star12); DestroyEntity(star13); DestroyEntity(star14); DestroyEntity(star15); DestroyEntity(star16); DestroyEntity(star17); DestroyEntity(star18); ShowStaticDialog("CDR NOVAH", "The freighter is under attack by a Dragoon bomber.\nIt will take several jumps to reach the Dragoon from here, but with\nluck and good jumps you should be able to reach it before it's too late.\n\n(Press the space bar to continue)", "Content/Portraits/CDRNovah", null, "BottomRight"); DragoonSchematicImage = LoadTexture("Content/MiniGames/MMDragoonSchematic"); DragoonSlide = CreateEntity(DragoonSchematicImage); DragoonSlide.X = ScreenWidth(0.50); DragoonSlide.Y = ScreenHeight(0.375); DragoonSlide.Z = 1; DragoonSlide.Width = ScreenWidth(1); DragoonSlide.Height = ScreenHeight(0.75); WSISlide.Visible = false; WaitFor("next"); ShowStaticDialog("CDR NOVAH", "Friendly ships may warp in to give you help, but be careful since hostile ships have also been spotted.\nNow get out there and good luck!\n\n(Press the space bar to continue)", "Content/Portraits/CDRNovah", null, "BottomRight"); FreighterSchematicImage = LoadTexture("Content/MiniGames/MMFreighterSchematic"); FreighterSlide = CreateEntity(FreighterSchematicImage); FreighterSlide.X = ScreenWidth(0.50); FreighterSlide.Y = ScreenHeight(0.375); FreighterSlide.Z = 1; FreighterSlide.Width = ScreenWidth(1); FreighterSlide.Height = ScreenHeight(0.75); DragoonSlide.Visible = false; WaitFor("next"); ShowStaticDialog("FLASH", "Roger that!\n\n(Press the space bar to continue)", "Content/Portraits/FlashFlightSuit", null, "BottomLeft"); WaitFor("next"); ShowPersistentStaticDialog("INFOBOT", "To steer your ship, press the left and right arrow keys (try it now).", "Content/Portraits/Robot1", null, "TopLeft"); FreighterSlide.Visible = false; RunScript("Astropolis/MeteorMadness/Launch.lua"); MMSetPhase("Shooter"); MMOnlyAllowTurns(); MMClearKeyWaitList(); WaitFor("MMFirstKey"); WaitFor("MMSecondKey"); ClearDialogs(); ShowPersistentStaticDialog("INFOBOT", "You can also fly upside down. Press and hold the left or right arrow until you reach the top of \nthe screen.", "Content/Portraits/Robot1", null, "TopLeft"); WaitFor("MMUpsideDown"); ClearDialogs(); ShowStaticDialog("INFOBOT", "Regardless of how the ship is turned around, the left arrow moves the ship to port\nand the right arrow moves it to starboard. So when you're upside down it may seem\nas though you are steering backwards, until you get used to it.\n\n(Press the space bar to continue)", "Content/Portraits/Robot1", null, "BottomLeft"); WaitFor("next"); ShowPersistentStaticDialog("INFOBOT", "Fly back down to the bottom of the screen and I'll go over your weapons.", "Content/Portraits/Robot1", null, "BottomLeft"); WaitFor("MMRightsideUp"); ClearDialogs(); ShowPersistentStaticDialog("INFOBOT", "Press space bar to fire photonic torpedoes. They can be used to destroy meteors and other \ndebris.", "Content/Portraits/Robot1", null, "TopLeft"); MMAllowFire(); MMSpawnMeteors(6); WaitFor("MMFire"); ClearDialogs(); ShowStaticDialog("INFOBOT", "You have unlimited ammunition, and you can hold down the space bar to fire continuously.", "Content/Portraits/Robot1", null, "TopLeft"); WaitFor("next"); ShowPersistentStaticDialog("INFOBOT", "Other vessels may jump through wormholes to give you help. Align your vessel with a \nwormhole and press the up arrow key to open it. This takes a lot of energy \nand will drain your engines for a few seconds.", "Content/Portraits/Robot1", null, "TopLeft"); MMSpawnUnitWormhole(8 / 3); MMAllowConnect(); WaitFor("MMConnect"); MMDisallowTurns(); MMSpawnFriendly(); Wait(2); ClearDialogs(); ShowStaticDialog("INFOBOT", "This is a friendly ship and should not be fired on. Remain in front of this ship to recieve \nan item.\n\n(Then press the space bar to continue)", "Content/Portraits/Robot1", null, "TopLeft"); WaitFor("next"); ShowStaticDialog("INFOBOT", "You have received a weapons upgrade! Friendly ships may also send you\nbonus resources for your colony.\n\n(Press the space bar to continue)", "Content/Portraits/Robot1", null, "TopLeft"); MMAllowTurns(); WaitFor("next"); MMSpawnUnitWormhole(9 / 3); ShowPersistentStaticDialog("INFOBOT", "Another wormhole has appeared. This time an enemy will jump through it. Align yourself with \nthe wormhole, press the up arrow key to open it, and then space bar to fire at the enemy \nuntil it is destroyed.", "Content/Portraits/Robot1", null, "TopLeft"); WaitFor("MMConnect"); MMSpawnEnemy(); Wait(2); ClearDialogs(); ShowPersistentStaticDialog("INFOBOT", "Warning: hostile vessel spotted! Press space bar to fire photonic torpedoes!", "Content/Portraits/Robot1", null, "TopLeft"); Wait(10); ClearDialogs(); ShowStaticDialog("INFOBOT", "Your shields can withstand several hits. They also regenerate over time. However, if \nyour shield power drops below zero your ship will be destroyed.\n\n(Press the space bar to continue)", "Content/Portraits/Robot1", null, "TopLeft"); WaitFor("next"); ShowStaticDialog("INFOBOT", "The ships used by friendly and hostile forces change each time you begin this \nmission. Base will tell you which ships are which each time you launch.\n\n(Press the space bar to continue)", "Content/Portraits/Robot1", null, "TopLeft"); WaitFor("next"); MMSpawnPlayerWormhole(); MMOnlyAllowTurns(); MMDisallowTurns(); ShowStaticDialog("INFOBOT", "A green wormhole has appeared. You will automatically enter it to warp closer to your \nobjective. Prepare to jump.\n\n(Press the space bar to continue)", "Content/Portraits/Robot1", null, "TopLeft"); WaitFor("next"); RunScript("Astropolis/MeteorMadness/EnterWarp"); MMSetPhase("DotTest"); MMSetDrift("Right"); ShowStaticDialog("INFOBOT", "You are now in hyperspace, speeding past millions of stars. Sometimes you will drift off course.\nWhen this happens, the stars seem to drift to one side or another.\n\n(Press the space bar to continue)", "Content/Portraits/Robot1", null, "BottomLeft"); WaitFor("next"); ShowStaticDialog("INFOBOT", "You must correct this drift by steering back towards the stars:\nIf you see the stars moving LEFT, press the LEFT arrow.\nIf you see the stars moving RIGHT, press the RIGHT arrow.\n\n(Press the space bar to continue)", "Content/Portraits/Robot1", null, "BottomLeft"); WaitFor("next"); MMTurn("Right"); MMSetDrift("None"); Wait(2); ShowPersistentStaticDialog("INFOBOT", "Now you try. Press the left arrow key.", "Content/Portraits/Robot1", null, "BottomLeft"); MMSetDrift("Left"); WaitFor("MMLeft"); ClearDialogs(); MMTurn("Left"); MMSetDrift("None"); ShowStaticDialog("INFOBOT", "Steering in the wrong direction, or not steering in time, will damage your energy shields.\n\n(Press the space bar to continue)", "Content/Portraits/Robot1", null, "BottomLeft"); WaitFor("next"); ShowStaticDialog("INFOBOT", "Sometimes it's difficult to notice a hyperspace drift, and even the best pilots get hit a lot.\nJust try your best and you will soon reach the end of the hyperspace jump.\n\n(Press the space bar to continue)", "Content/Portraits/Robot1", null, "BottomLeft"); WaitFor("next"); ShowStaticDialog("INFOBOT", "This concludes your training. Good luck!\n\n(Press the space bar to exit)", "Content/Portraits/Robot1", null, "BottomLeft"); WaitFor("next"); RunScript("Astropolis/MeteorMadness/LeaveWarp"); GoToMMMenu(); ClearHUD(); SetShowCursor(true);