Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // DXNMission59Script.
- //=============================================================================
- class DXNMission59Script extends MissionScript;
- var byte savedSoundVolume;
- var float endgameDelays[4];
- var float endgameTimer;
- var localized string endgameQuote[18];
- var HUDMissionStartTextDisplay quoteDisplay;
- var bool bQuotePrinted;
- var Float displayTime;
- // ----------------------------------------------------------------------
- // InitStateMachine()
- // ----------------------------------------------------------------------
- function InitStateMachine()
- {
- Super.InitStateMachine();
- // Destroy all flags!
- if (flags != None)
- flags.DeleteAllFlags();
- // Set the PlayerTraveling flag (always want it set for
- // the intro and endgames)
- flags.SetBool('PlayerTraveling', True, True, 0);
- }
- // ----------------------------------------------------------------------
- // FirstFrame()
- //
- // Stuff to check at first frame
- // ----------------------------------------------------------------------
- function FirstFrame()
- {
- Super.FirstFrame();
- }
- // ----------------------------------------------------------------------
- // PreTravel()
- //
- // Set flags upon exit of a certain map
- // ----------------------------------------------------------------------
- function PreTravel()
- {
- // restore the sound volume
- SoundVolume = savedSoundVolume;
- Player.SetInstantSoundVolume(SoundVolume);
- Super.PreTravel();
- }
- // ----------------------------------------------------------------------
- // Timer()
- //
- // Main state machine for the mission
- // ----------------------------------------------------------------------
- function Timer()
- {
- local MichaelHamner NewsAnnouncer;
- Super.Timer();
- // After the Intro conversation is over, tell the player to go on
- // to the next map (which will either be the main menu map or
- // the first game mission if we're starting a new game.
- if (flags.GetBool('DXNIntroStartTalking') && !flags.GetBool('DXNIntro2'))
- {
- if (player != None)
- {
- // Make sure all the flags are deleted.
- DeusExRootWindow(Player.rootWindow).ResetFlags();
- // Find our buddy NewsAnnouncer, because he has the conversation!
- foreach AllActors(class'MichaelHamner', NewsAnnouncer)
- break;
- if (NewsAnnouncer != None)
- {
- // Start the conversation
- player.StartConversationByName('IntroDXN', NewsAnnouncer, False, True);
- }
- // turn down the sound so we can hear the speech
- savedSoundVolume = SoundVolume;
- SoundVolume = 32;
- Player.SetInstantSoundVolume(SoundVolume);
- flags.SetBool('DXNIntro2', True,, 69);
- }
- }
- if (flags.GetBool('IntroDXN_Played'))
- {
- flags.SetBool('IntroDXN_Played', False,, 69);
- player.PostIntro();
- }
- if (flags.GetBool('IntroDXN_Interrupted'))
- {
- flags.SetBool('IntroDXN_Interrupted', False,, 69);
- flags.SetBool('IntroDXN_Played', False,, 69);
- player.PostIntro();
- }
- }
- // ----------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement