home *** CD-ROM | disk | FTP | other *** search
- #include "common.acs"
-
- /* -----------------------------------
- Shattering Glass
- I had to do this a little differently than
- most windows to make it a repeatable
- action. Basically the window is set up
- like a door i.e (ceiling height set to floor)
- Then the ceiling is raised revealing the
- broken glass texture. Fireballs are spewed
- about not only for the cool effect but becouse
- of a bug in Hexen where glass shards are not
- removed from the game and will cause a memory
- error after to many hits. (thanks to Dalias
- for discovering this) Therefore only Things
- that extinguish themselfs should be used here.
- After a slight delay the window is put back
- again by lowering the ceiling to the floor.
- This puts the unbroken glass texture back,
- ready to be broken again. I used a crushing
- funtion to lower the ceiling to clear the
- window sector of any players. Also the
- Ceiling_LowerAndCrush funtion only seems to lower
- the ceiling to 8 about the floor. So a second
- funtion is called to close it the rest of the way.
- Ocasionally the window does not close all the way
- durring play, a second breaking will generally cure
- this problem.
-
- sect sector that will raise and lower to
- open and close window
- spot TID of thing to spew out fireballs from
- angle angle around which fireballs will spew
-
- i.e the fireballs will spew out at random angles
- ranging from plus or minus approxamatly 45 degrees
- the specified angle
- --------------------------------------- */
-
- script 1 (int sect, int spot, int angle)
- {
- int i;
- Ceiling_RaiseByValue(sect, 255, 128);
- sectorsound("GlassShatter", 255);
- i = 0;
- while (i < 16)
- {
- Thing_ProjectileGravity(spot, T_FIREBALL1, angle + random(0, 48) - random(0, 48), random(16,24), random(8,32));
- i = i + 1;
- }
- i = 0;
- while (i < 3)
- {
- Thing_Projectile(spot, T_FIREBALL1, angle + random(0, 32) - random(0, 32), random(100,200), 0);
- i = i + 1;
- }
- delay(50);
- Ceiling_LowerAndCrush(sect, 255, 16);
- delay(10);
- Ceiling_LowerByValue(sect, 255, 8);
-
- }
-
- /*------------------------------------
- This creates a ring of spikeballs that
- emanate out from the center at the
- specified speed
- spot TID of thing to shhot balls from
- spd the speed at which the balls will fly
- ------------------------------------*/
-
- script 2 (int spot, int angle, int spd)
- {
- int i;
- print(s:"HEE HEE HEE");
- i = 0;
- while (i < 32)
- {
- Thing_Projectile(spot, T_RIPPERBALL, random(0, 224), spd, 0);
- i = i + 1;
- }
- }
-
- script 3 (int qspot, int rspot, int Vspd)
- {
-
- int i;
-
- Radius_Quake(9,255, 5, 15, qspot);
- i = 0;
- WHILE(i<10)
- {
- Thing_Projectile(rspot, T_FIREBALL1, Random(54, 74),100, Vspd);
- Delay(10);
- i = i + 1;
- }
-
- }
-
-
- script 4 (int mapwrp)
- {
- print(s:"TELEPORTER WARP LEVEL SET");
- delay(25);
- print(i:mapwrp);
- setlinespecial(3, 74,mapwrp,0,0,0,0);
- }
-
-
- script 5 (int stag)
- {
- Door_Raise(6,5,5);
- ambientsound("KoraxVoiceGreetings",155);
- }
-
- script 255 OPEN
- {
- print(s:"UNHOLY GROUND BY CLAUDEC");
- }
-
-