home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPEL 3
/
spel3.iso
/
add-on
/
hexen
/
uhg01
/
uhg01.acs
next >
Wrap
Text File
|
1995-11-25
|
3KB
|
100 lines
#include "common.acs"
/* -----------------------------------
Shattering Glass
I had to do this a little diferently 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 < 32)
{
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 fangle)
{
Radius_Quake(9,255, 5, 15, qspot);
Thing_Projectile(rspot, T_FIREBALL1, fangle, 100, 0);
}
script 255 OPEN
{
print(s:"UNHOLY GROUND BY CLAUDEC");
}