Advertisement
Treedestroyed

Untitled

Jan 23rd, 2019
1,667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class RandomWeekly extends KFGameInfo_WeeklySurvival;
  2.  
  3. static event class<GameInfo> SetGameType( string MapName, string Options, string Portal )
  4. {
  5.     return default.class;
  6. }
  7.  
  8. function CreateOutbreakEvent()
  9. {
  10.     super(KFGameInfo).CreateOutbreakEvent();
  11. }
  12.  
  13. function WaveStarted()
  14. {
  15.     local byte RandomEvent;
  16.     local string PrimaryMessage, SecondaryMessage;
  17.     local KFPlayerController KFPC;
  18.     local KFWeeklyOutbreakInformation WeeklyInfo;
  19.  
  20.     super.WaveStarted();
  21.    
  22.     KFPC = KFPlayerController( MyKFGRI.GetALocalPlayerController() );
  23.    
  24.     RandomEvent = Rand(8);
  25.    
  26.     OutbreakEvent.SetActiveEvent( RandomEvent );
  27.    
  28.     if ( KFPC != None && KFPC.MyGFxHUD != None && KFPC.MyGFxManager != None )
  29.     {
  30.         WeeklyInfo = class'KFMission_LocalizedStrings'.static.GetWeeklyOutbreakInfoByIndex( RandomEvent );
  31.        
  32.         PrimaryMessage = WeeklyInfo.FriendlyName;
  33.         SecondaryMessage = WeeklyInfo.DescriptionStrings[0];
  34.        
  35.         KFPC.MyGFxManager.QueueDelayedPriorityMessage( PrimaryMessage, SecondaryMessage, 5.f );
  36.     }
  37. }
  38.  
  39. function byte GetWaveStartMessage()
  40. {
  41.     if ( OutbreakEvent != None  )
  42.     {
  43.         return GMT_WaveStartWeekly;
  44.     }
  45.  
  46.     return super.GetWaveStartMessage();
  47. }
  48.  
  49. function WaveEnded( EWaveEndCondition WinCondition )
  50. {
  51.     local KFPawn KFP;
  52.    
  53.     super.WaveEnded( WinCondition );
  54.  
  55.     OutbreakEvent.ClearActiveEvent();
  56.  
  57.     foreach WorldInfo.AllPawns( class'KFPawn', KFP )
  58.     {
  59.         KFP.IntendedBodyScale = 1.f;
  60.     }
  61. }
  62.  
  63. function bool UsesModifiedDifficulty()
  64. {
  65.     return false;
  66. }
  67.  
  68. function bool UsesModifiedLength()
  69. {
  70.     return false;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement