GlassBreak - What do I need to make it work?

Archive of the old editing forum
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.
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

GlassBreak - What do I need to make it work?

Post by Tormentor667 »

What sounds, sprites and actors do I need to add to Doom to make the [wiki]GlassBreak[/wiki] special work?
Last edited by Tormentor667 on Sat Feb 14, 2015 5:41 am, edited 1 time in total.
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Kinsie »

Create a switch in ANIMDEFs that goes from a glass texture to an appropriate texture (broken frame, blank texture etc.) with a glass shattering activation sound, and copy over the SHAR D, E and F frames from Hexen. Sorted!
User avatar
Enjay
 
 
Posts: 26970
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Enjay »

Wiki tags work by just using the page name

Code: Select all

[Wiki]GlassBreak[/wiki]
As for the question, if you look at the page you linked to, it has a link to the GlassJunk actor. It uses the sprite name SHAR. However, Strife uses SHRD for its glass shard name. This is an example of the sprite renaming ( [wiki]Sprite#Conflicting_sprite_names[/wiki] ) that ZDoom does to avoid conflicts across IWADs (In this case there is a clash with Hexen I think).

As for the sound, Strife uses DSBGLASS which is in SNDINFO as world/glassbreak.

However, are you sure that you really want to do it this way? IMO the Strife glass break special is a bit crap. The glass shards spawn in a really lacklustre way. Personally, I think this, while slightly more involved to set up (only slightly) is a lot better:

http://forum.zdoom.org/viewtopic.php?f= ... 41#p809641

i.e. basically the Hexen way of doing it.
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Tormentor667 »

@Kinsie & Enjay - Thanks to both of you for the info. I tried Enjay's variant which is pretty nice but too complicated to implement for the use and frequency I am going to use it so the Strife variant (which I got working now) is fine for me. I got one problem though: The sound isn't being played even though I have a DSBGLASS lump and added it to the world/glassbreak SNDINFO, I can even play it with the console but it doesn't work through the GlassBreak script special.
User avatar
Enjay
 
 
Posts: 26970
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Enjay »

Did you define your switch textures using the sound?

These are the Strife ones from zdoom.pk3's animdefs

Code: Select all

switch strife GLASS01 on sound world/glassbreak pic GLASS02 tics 0
switch strife GLASS03 on sound world/glassbreak pic GLASS04 tics 0
switch strife GLASS05 on sound world/glassbreak pic GLASS06 tics 0
switch strife GLASS07 on sound world/glassbreak pic GLASS08 tics 0
switch strife GLASS17 on sound world/glassbreak pic GLASS18 tics 0
switch strife GLASS19 on sound world/glassbreak pic GLASS20 tics 0
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Tormentor667 »

That explains everything :) Thank you Nigel!
User avatar
Enjay
 
 
Posts: 26970
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Enjay »

No problem.

BTW, my "complicated one" doesn't have to be complicated at all. You actually only need to have the script once in your ACS for the map and then use parameters when you run the script. When you identify the line and place the map objects to spawn the shards, give them line ids and tids that tie in with the parameters and you're good to go.

Let's face it, if this way of doing it wasn't too complicated for Hexen... ;)
User avatar
Ozymandias81
Posts: 2067
Joined: Thu Jul 04, 2013 8:01 am
Graphics Processor: nVidia with Vulkan support
Location: Mount Olympus, Mars
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Ozymandias81 »

Enjay wrote:No problem.

BTW, my "complicated one" doesn't have to be complicated at all. You actually only need to have the script once in your ACS for the map and then use parameters when you run the script. When you identify the line and place the map objects to spawn the shards, give them line ids and tids that tie in with the parameters and you're good to go.

Let's face it, if this way of doing it wasn't too complicated for Hexen... ;)
And what could you say about my tricky solution Enjay?
User avatar
Enjay
 
 
Posts: 26970
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Enjay »

I'm not quite sure what you are going for there. It looks basically like you are trying to make a more portable version of the Hexen-style script? I guess some stuff could be externalised to a library script called by a dying actor but, unless I'm misunderstanding you, I don't see it saving a massive amount of setup effort versus doing things without the special actor.
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Tormentor667 »

I did a combination of Strife's variant and a custom shard spawner that replaces the ShardJunk from Strife's original actor and voila: Good things of both sides :) But thanks for your help, that made the customization a lot easier.
User avatar
Enjay
 
 
Posts: 26970
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Enjay »

Tormentor667 wrote:I did a combination of Strife's variant and a custom shard spawner that replaces the ShardJunk from Strife's original actor and voila: Good things of both sides :)
Actually, yes, that's a pretty good solution.

I don't know if you want to do it (or maybe you already have) but remember that switches don't just have to go between an on and off picture, they can have animations in between. So, if you have intermediate smashing frames, you can include them in your switch definition too.
Spoiler:
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Tormentor667 »

That's a good idea, I totally forgot about that feature :)
User avatar
Ozymandias81
Posts: 2067
Joined: Thu Jul 04, 2013 8:01 am
Graphics Processor: nVidia with Vulkan support
Location: Mount Olympus, Mars
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Ozymandias81 »

Enjay wrote:I don't see it saving a massive amount of setup effort versus doing things without the special actor.
I need this actor because of 3d reasons: if I plan to build a waggling house and I shoot under/below where the line is exactly tagged (I'm using Hexen's map format), the result would be that windows will always broke or never (not to mention the fact that any actor that will passthru lines will be blocked). Please answer to my post, I don't want to fill other's posts with my garbage.
boris
Posts: 773
Joined: Tue Jul 15, 2003 3:37 pm

Re: GlassBreak - What do I need to make it work?

Post by boris »

That the shards of breaking glass always originated from one spot always annoyed me in Hexen. I just played around a bit (i.e. way way too long) with the possibilities and came up with a solution that's relatively easy to use (still uses two map spots per breakable line, though), and looks pretty good, since it actually spawns shards all over the pane:


Attached is the example wad based on Enjay's resources linked in the quoted thread.
Attachments
breakglass.pk3
(44.48 KiB) Downloaded 276 times
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: GlassBreak - What do I need to make it work?

Post by Nash »

Boris: Pretty clever! However when shooting under the glass with the 3D beam, somehow it breaks the glass at the top of the beam too. :O
Locked

Return to “Editing (Archive)”