SHARE
TWEET

Untitled

a guest Sep 12th, 2016 125 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "zcommon.acs"
  2.  
  3. function int Clamp(int i, int min, int max)
  4. {
  5.     if (i < min) return min;
  6.     if (i > max) return max;
  7.     return i;
  8. }
  9.  
  10. script "DPartSide" (int cx, int cy, int cz, int sang)
  11. {
  12.     int topz = cz+64.0;
  13.    
  14.     for (int i = 0; i < 128; i++)
  15.     {
  16.         int x = sin(sang)*32 + cx;
  17.         int y = cos(sang)*32 + cy;
  18.         int z = topz-(i<<16);
  19.        
  20.         SpawnParticle(0x00FF00, true, 35, 9, x, y, z, 0, 0, 0, 0, 0, 0, Clamp(i*6, 0, 255), -1);
  21.         sang += 0.01*2;
  22.         if ((i%4)==0) Delay(1);
  23.     }
  24. }
  25.  
  26. script "DPartBottom" (int cx, int cy, int cz)
  27. {
  28.     int angf = 360/2;
  29.     int angdst = 65535/angf;
  30.     for (int j = 0; j < 64; j+=2)
  31.     {
  32.         for (int i = 0; i < angf; i++)
  33.         {
  34.             int x = sin(angdst*i)*j + cx;
  35.             int y = cos(angdst*i)*j + cy;
  36.             int z = cz;
  37.            
  38.             if (j == 32) SpawnParticle(0x00FF00, true, 35, 8, x, y, z, 0, 0, 0, 0, 0, 0, 255, -1);
  39.             else SpawnParticle(0x00FF00, true, 1, 4, x, y, z, 0, 0, 0, 0, 0, 0, 64-j, 0);
  40.         }
  41.         Delay(1);
  42.     }
  43. }
  44.  
  45. script "DSpawnScript" (int tag, int mons)
  46. {
  47.     int cx = GetActorX(tag);
  48.     int cy = GetActorY(tag);
  49.     int cz = GetActorZ(tag);
  50.     ACS_NamedExecuteWithResult("DPartBottom", cx, cy, cz, 0);
  51.     ACS_NamedExecuteWithResult("DPartSide", cx, cy, cz, 0.25);
  52.     ACS_NamedExecuteWithResult("DPartSide", cx, cy, cz, 0.75);
  53.     Delay(15);
  54.     SpawnForced("TeleportFog", cx, cy, cz);
  55.     SpawnForced(mons, cx, cy, cz, 0, GetActorAngle(tag)>>8);
  56. }
  57.  
  58. script 1 (void)
  59. {
  60.     ACS_NamedExecuteWithResult("DSpawnScript", 1, "DoomImp", 0, 0);
  61. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top