Transparent Smashable Glass - How?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
-
- Posts: 3975
- Joined: Fri Jul 06, 2007 9:16 am
Transparent Smashable Glass - How?
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?
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?
I can do better than that. I can make you a quick example...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?
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.

-
- Posts: 3975
- Joined: Fri Jul 06, 2007 9:16 am
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.
Removing the animated smashing glass effect would simplify it further:
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)
{
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);
}
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);
}
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);
}
-
- Posts: 3975
- Joined: Fri Jul 06, 2007 9:16 am
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?
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?
-
- Posts: 307
- Joined: Wed Aug 23, 2006 7:58 am
- Kappes Buur
-
- Posts: 4180
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: Transparent Smashable Glass - How?
Over the years I have played many levels with smashable glass, with more or less success.CaptainToenail wrote:I want some smashable glass in my map. ...
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.