Page 1 of 1
Transparent Smashable Glass - How?
Posted: Fri Aug 10, 2007 6:50 am
by CaptainToenail
I want some smashable glass in my map. I want a bit where there is a corridor with glass tubes along the sides containing inactive monsters. When a certain line is reached, the glass smashes, and the monsters come out and get you.
I'm guessing it's a combination of texture, blocking line, sound and activate scripts.
Can anyone tell me how to do it for certain?
Re: Transparent Smashable Glass - How?
Posted: Fri Aug 10, 2007 8:01 am
by Enjay
CaptainToenail wrote:I'm guessing it's a combination of texture, blocking line, sound and activate scripts.
Can anyone tell me how to do it for certain?
I can do better than that. I can make you a quick example...
http://www.zen64060.zen.co.uk/smash02.zip
The above is an edited version of my smashable mirror example from my examples site. Shoot the mirror to smash it and flick the switch to release the imp. If I was making this from scratch, I'd make a better DECORATE glass shard item but this map is based on an old example and uses one of the Hexen glass shards instead.
Use what you like from it.

Posted: Fri Aug 10, 2007 9:09 am
by CaptainToenail
Wow, thanks, that's great, although I was hoping for something a bit simpler.
Posted: Fri Aug 10, 2007 9:23 am
by Enjay
Well, script 3 is the one that does the smashing of the imp chamber. If you don't want to spawn any glass shards it would be a lot simpler looking.
Code: Select all
script 3 (void)
{
Sector_SetColor(1, 255, 255, 255);
Thing_Deactivate (4);
thingsound(2, "glass", 127);
setlinetexture (103, SIDE_FRONT, TEXTURE_MIDDLE, "njsmsh01");
setlinetexture (103, SIDE_BACK, TEXTURE_MIDDLE, "njsmsh01");
delay(const:4);
setlinetexture (103, SIDE_FRONT, TEXTURE_MIDDLE, "njsmsh02");
setlinetexture (103, SIDE_BACK, TEXTURE_MIDDLE, "njsmsh02");
delay(const:4);
setlinetexture (103, SIDE_FRONT, TEXTURE_MIDDLE, "njsmsh03");
setlinetexture (103, SIDE_BACK, TEXTURE_MIDDLE, "njsmsh03");
delay(const:4);
setlinetexture (103, SIDE_FRONT, TEXTURE_MIDDLE, "njsmsh04");
setlinetexture (103, SIDE_BACK, TEXTURE_MIDDLE, "njsmsh04");
delay(const:4);
setlinetexture (103, SIDE_FRONT, TEXTURE_MIDDLE, "-");
setlinetexture (103, SIDE_BACK, TEXTURE_MIDDLE, "-");
Setlineblocking(103,OFF);
Thing_Activate (3);
}
Removing the animated smashing glass effect would simplify it further:
Code: Select all
script 3 (void)
{
Sector_SetColor(1, 255, 255, 255);
Thing_Deactivate (4);
thingsound(2, "glass", 127);
setlinetexture (103, SIDE_FRONT, TEXTURE_MIDDLE, "-");
setlinetexture (103, SIDE_BACK, TEXTURE_MIDDLE, "-");
Setlineblocking(103,OFF);
Thing_Activate (3);
}
And removing additonal effects like sector colour and the fountain boils it down to - play a sound, remove the glass texture, unblock the lines and activate the imp
Code: Select all
script 3 (void)
{
thingsound(2, "glass", 127);
setlinetexture (103, SIDE_FRONT, TEXTURE_MIDDLE, "-");
setlinetexture (103, SIDE_BACK, TEXTURE_MIDDLE, "-");
Setlineblocking(103,OFF);
Thing_Activate (3);
}
Posted: Fri Aug 10, 2007 9:39 am
by CaptainToenail
Excellent! Thanks!
Edit: I can't get this thing to work. Can't I use a built in command from Strife or something?
Posted: Fri Aug 10, 2007 12:34 pm
by Enjay
I don't *think* you can activate Strife smashing glass remotely and you wouldn't be able to build in any additional effects, like activating the monsters in your tubes.
What kind of difficulties are you having getting it working (ie what happens (or doesn't happen) any error messages when compiling the script or playing the game etc)? Is it possible for you to post your map - or a section of it - and your script for people to look at and try to figure out what is wrong?
Posted: Fri Aug 10, 2007 2:07 pm
by Karate Chris
When I shoot the mirror with the BFG9000 it does not seem to break.
Posted: Fri Aug 10, 2007 2:13 pm
by Enjay
Same here. Don't know why.

Re: Transparent Smashable Glass - How?
Posted: Sun Aug 12, 2007 12:33 pm
by Kappes Buur
CaptainToenail wrote:I want some smashable glass in my map. ...
Over the years I have played many levels with smashable glass, with more or less success.
The most memorable levels are
GOKSCRIB.WAD by an unknown author. Another interesting
aspect of this level is the skewed entrance when slopes were not even thought of. And the
other level is
CSCASTLE.WAD by our very own Biff. I believe that this is one of the top levels
in anyone's DM arsenal.