Guest User

Untitled

a guest
May 14th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //=============================================================================
  2. // WaveController.
  3. //=============================================================================
  4. class WaveController expands Actor;
  5. struct Waves
  6. {
  7. var() float WaveLength;
  8. var() name WaveTag;
  9. };
  10.  
  11. var() Waves Wave[8];
  12. var() float StartTime;
  13. var() bool bHungarian;
  14. var int i;
  15.  
  16. function BeginPlay()
  17. {
  18. i=0;
  19. SetTimer(StartTime, false);
  20. if(bHungarian)
  21. {
  22. BroadcastMessage(StartTime$ " msodperc mlva indul az els hullm");
  23. }
  24. else
  25. {
  26. BroadcastMessage(StartTime$ " seconds until the first wave starts");
  27. }
  28. }
  29.  
  30.  
  31. simulated function Timer()
  32. {
  33. local ScriptedPawn P;
  34.  
  35. foreach Allactors(class'ScriptedPawn', P)
  36.     {
  37.     if(P.IsA('MPZombie'))
  38.         {
  39.         if(P.Tag==Wave[i].WaveTag)
  40.             {
  41.             if(bHungarian)
  42.                 {
  43.                 BroadcastMessage("Kvetkez hullm indul");
  44.                 }
  45.             else
  46.                 {
  47.                 BroadcastMessage("Next wave starts now");
  48.                 }
  49.            
  50.             P.EnterWorld();
  51.             i=i+1;
  52.             }
  53.         else
  54.             {
  55.             if(bHungarian)
  56.                 {
  57.                 BroadcastMessage("Nincs tbb hullm");
  58.                 }
  59.             else
  60.                 {
  61.                 BroadcastMessage("No more waves");
  62.                 }
  63.             }
  64.            
  65.         }
  66.     }
  67. }
Add Comment
Please, Sign In to add comment