GZDoom Builder - Breakable Glass?

Need help with your project? Ask here.
lp-ALPHA
Posts: 3
Joined: Fri Jan 20, 2017 16:21

GZDoom Builder - Breakable Glass?

Post by lp-ALPHA »

I'm relatively new to the Doom map creating scene, and I'd like to know how to make shatterable glass. I already know how to make a texture transparent to make it look like glass, but as far as making it shatter into bits and play a glass shatter sound effect when I shoot it, I'm at a loss. I know it's possible, as I've seen multiple WADs and levels (especially in Brutal Doom) which have breakable windows and mirrors. Everywhere I've looked online, there have either been people who say it's not possible even though it clearly is, or there haven't been any in-depth tutorials on how to do it properly. (One in particular being an extremely outdated YouTube tutorial with horrible video and sound quality, which doesn't really help me at all)

Any help would be appreciated, as I've been trying to implement shatterable glass into one of my levels for over a month now through trial and error, but to no avail.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: GZDoom Builder - Breakable Glass?

Post by Gez »

There are several methods available.


1. Strife style: put the [wiki]GlassBreak[/wiki] special on the line, define the window's "intact" and "broken" textures as a switch in ANIMDEFS, provide sprites for the glass shards.
2. Hexen style: set the intact texture as the lower texture (or upper), the broken texture as the middle, put a map spot, and have the line special run a script when hit, which will perform instant lower (or raise), play a glass break sound, and spawn a bunch of glass shards at the map spot. You need the sector behind the glass to be "closed" originally so it won't work with translucent glass.
3. ZDoom style: set the line to run a script when hit that will make the line non-blocking, play a glass break sound, change the texture to the broken glass one, and spawn glass shards like in Hexen style.

My advice is to look at maps where the effect happens in a map editor and see how they did it. Know that you can probably improve on it, too.
Last edited by Blue Shadow on Sat Jan 21, 2017 6:15, edited 1 time in total.
Reason: Fixed wiki link.
lp-ALPHA
Posts: 3
Joined: Fri Jan 20, 2017 16:21

Re: GZDoom Builder - Breakable Glass?

Post by lp-ALPHA »

Thanks for the advice. Do you know any glass breaking scripts I can use, by chance? I found one on a YouTube video a few weeks back, but it's outdated and doesn't function properly now. Do you also have any tips for making breakable glass in GZDoom: Doom 2 (UDMF) Format? Thanks in advance.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: GZDoom Builder - Breakable Glass?

Post by Gez »

The first map of the first episode of ZPack has breakable glass windows. It's in M_CPTT01.wad in the ZPack archive.

It's a Hexen format map, so in UDMF you can simplify it. In Hexen format you have to use line_setidentification to give an ID to a line; in UDMF you don't need to, so all the stuff that's done by Script 1 OPEN can be done on the linedef directly.
lp-ALPHA
Posts: 3
Joined: Fri Jan 20, 2017 16:21

Re: GZDoom Builder - Breakable Glass?

Post by lp-ALPHA »

Awesome, thanks for the assistance!
Post Reply

Return to “Editing Help”