Advertisement
ZoriaRPG

Earthquake FFCs

Mar 16th, 2019
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.25 KB | None | 0 0
  1. ffc script Earthquake
  2. {
  3.     void run(int strength, int sfx, int sfx_delay, int aftershock_sfx)
  4.     {
  5.         bool done;
  6.         while(1)
  7.         {
  8.             Screen->Quake = strength;
  9.            
  10.             if ( sfx_delay < 1 ) Game->PlaySound(sfx);
  11.             --strength;
  12.             --sfx_delay;
  13.             done = true;
  14.             if ( strength > 0 ) done = false;
  15.             if ( strength > 0 ) done = false;
  16.             if ( done ) break;
  17.             Waitframe();
  18.         }
  19.         Game->PlaySound(aftershock_sfx); Quit();
  20.     }
  21. }
  22.  
  23. ffc script Earthquake
  24. {
  25.     void run(int strength, int sfx, int sfx_delay)
  26.     {
  27.         bool done;
  28.         while(1)
  29.         {
  30.             Screen->Quake = strength;
  31.            
  32.             if ( sfx_delay < 1 ) Game->PlaySound(sfx);
  33.             --strength;
  34.             --sfx_delay;
  35.             done = true;
  36.             if ( strength > 0 ) done = false;
  37.             if ( strength > 0 ) done = false;
  38.             if ( done ) Quit();
  39.             Waitframe();
  40.         }
  41.     }
  42. }
  43.  
  44.  
  45. ffc script Earthquake
  46. {
  47.     void run(int strength, int sfx, int sfx_delay, int aftershock_sfx)
  48.     {
  49.         bool done;
  50.         while(1)
  51.         {
  52.             Screen->Quake = strength;
  53.            
  54.             if ( sfx_delay < 1 ) Game->PlaySound(sfx);
  55.             --strength;
  56.             --sfx_delay;
  57.             done = true;
  58.             if ( strength > 0 ) done = false;
  59.             if ( strength > 0 ) done = false;
  60.             if ( done ) break;
  61.             Waitframe();
  62.         }
  63.         while(Screen->Quake > 0 ) Waitframe();
  64.         Game->PlaySound(aftershock_sfx); Quit();
  65.     }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement