Destroyable windows - An easier way

Handy guides on how to do things, written by users for users.

Moderators: GZDoom Developers, Raze Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.

Destroyable windows - An easier way

Postby enderkevin13 » Mon Jun 20, 2016 6:04 pm

Okay, so we all know that destroyable windows make any map neat, right? Yes, and that's what I wanna talk about. Up until now, I thought making destroyable windows had to be advanced, until Laser Pineapple here on the forums helped me out, and I don't want others to go through the same amount of trouble I did while trying to do it the hard way. Anyways, let's start.

First off, you should download this zip folder containing shard sprites, or you can use your own or something. I'd use these though, since they work best for most kinds of windows.

Anyways, after you added the sprites, find a window texture you want/like. It's important to use a fitting window depending on the theme of a map.
If you don't wanna spend a long time looking for the right texture, use this for now until you find another.

Anyways, let's get into the actually important stuff.

First off, you need to create a SNDINFO lump and ANIMDEFS lump, for a switch definition. Here's the code for both of those:

Code: Select allExpand view
glass/break   DSGLASS
$limit    glass/break 0
$pitchshift    glass/break 3
$rolloff    glass/break 1000 2000

Code: Select allExpand view
   on sound glass/break
   pic BKWINDOW tics 0
   pic SDWINDOW tics 0

What I suggest for the broken window texture is a blank one, but use whatever you want I guess.

Put those into their proper lumps, then save and go into Doom Builder or something like that.

Now, you need to create a line and make it impassible. After that, give it the window texture. Now, give it action 49 and make it triggered when a projectile passes and on projectile impact. After that, go into the map and it should work like a whistle!

If you need an example, here's one to use.
Breakable glass.wad
You do not have the required permissions to view the files attached to this post.
User avatar
Official abbadon of ZDoom
Banned User
Joined: 07 Jul 2015
Location: :noiƚɒɔo⅃

Re: Destroyable windows - An easier way

Postby protox » Sat Jul 09, 2016 8:27 am

Very cool, thanks for sharing.
User avatar
Joined: 23 Mar 2014

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests