Advertisement
Guest User

Untitled

a guest
Feb 18th, 2013
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. //=============================================================================
  2. // DXNMission59Script.
  3. //=============================================================================
  4. class DXNMission59Script extends MissionScript;
  5.  
  6. var byte savedSoundVolume;
  7. var float endgameDelays[4];
  8. var float endgameTimer;
  9. var localized string endgameQuote[18];
  10. var HUDMissionStartTextDisplay quoteDisplay;
  11. var bool bQuotePrinted;
  12. var Float displayTime;
  13.  
  14. // ----------------------------------------------------------------------
  15. // InitStateMachine()
  16. // ----------------------------------------------------------------------
  17.  
  18. function InitStateMachine()
  19. {
  20. Super.InitStateMachine();
  21.  
  22. // Destroy all flags!
  23. if (flags != None)
  24. flags.DeleteAllFlags();
  25.  
  26. // Set the PlayerTraveling flag (always want it set for
  27. // the intro and endgames)
  28. flags.SetBool('PlayerTraveling', True, True, 0);
  29. }
  30.  
  31. // ----------------------------------------------------------------------
  32. // FirstFrame()
  33. //
  34. // Stuff to check at first frame
  35. // ----------------------------------------------------------------------
  36.  
  37. function FirstFrame()
  38. {
  39.  
  40. Super.FirstFrame();
  41.  
  42. }
  43.  
  44. // ----------------------------------------------------------------------
  45. // PreTravel()
  46. //
  47. // Set flags upon exit of a certain map
  48. // ----------------------------------------------------------------------
  49.  
  50. function PreTravel()
  51. {
  52. // restore the sound volume
  53. SoundVolume = savedSoundVolume;
  54. Player.SetInstantSoundVolume(SoundVolume);
  55.  
  56. Super.PreTravel();
  57.  
  58.  
  59.  
  60. }
  61.  
  62. // ----------------------------------------------------------------------
  63. // Timer()
  64. //
  65. // Main state machine for the mission
  66. // ----------------------------------------------------------------------
  67.  
  68. function Timer()
  69. {
  70.  
  71. local MichaelHamner NewsAnnouncer;
  72. Super.Timer();
  73.  
  74. // After the Intro conversation is over, tell the player to go on
  75. // to the next map (which will either be the main menu map or
  76. // the first game mission if we're starting a new game.
  77.  
  78.  
  79. if (flags.GetBool('DXNIntroStartTalking') && !flags.GetBool('DXNIntro2'))
  80. {
  81. if (player != None)
  82. {
  83. // Make sure all the flags are deleted.
  84. DeusExRootWindow(Player.rootWindow).ResetFlags();
  85.  
  86. // Find our buddy NewsAnnouncer, because he has the conversation!
  87. foreach AllActors(class'MichaelHamner', NewsAnnouncer)
  88. break;
  89.  
  90. if (NewsAnnouncer != None)
  91. {
  92. // Start the conversation
  93. player.StartConversationByName('IntroDXN', NewsAnnouncer, False, True);
  94. }
  95.  
  96. // turn down the sound so we can hear the speech
  97. savedSoundVolume = SoundVolume;
  98. SoundVolume = 32;
  99. Player.SetInstantSoundVolume(SoundVolume);
  100. flags.SetBool('DXNIntro2', True,, 69);
  101. }
  102. }
  103.  
  104.  
  105. if (flags.GetBool('IntroDXN_Played'))
  106. {
  107. flags.SetBool('IntroDXN_Played', False,, 69);
  108. player.PostIntro();
  109. }
  110. if (flags.GetBool('IntroDXN_Interrupted'))
  111. {
  112. flags.SetBool('IntroDXN_Interrupted', False,, 69);
  113. flags.SetBool('IntroDXN_Played', False,, 69);
  114. player.PostIntro();
  115. }
  116. }
  117.  
  118. // ----------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement