Page 1 of 2

GlassBreak - What do I need to make it work?

Posted: Sat Feb 14, 2015 4:50 am
by Tormentor667
What sounds, sprites and actors do I need to add to Doom to make the [wiki]GlassBreak[/wiki] special work?

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

Posted: Sat Feb 14, 2015 4:56 am
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!

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

Posted: Sat Feb 14, 2015 5:11 am
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.

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

Posted: Sat Feb 14, 2015 5:28 am
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.

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

Posted: Sat Feb 14, 2015 5:36 am
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

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

Posted: Sat Feb 14, 2015 5:38 am
by Tormentor667
That explains everything :) Thank you Nigel!

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

Posted: Sat Feb 14, 2015 5:40 am
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... ;)

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

Posted: Sat Feb 14, 2015 5:55 am
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?

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

Posted: Sat Feb 14, 2015 6:03 am
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.

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

Posted: Sat Feb 14, 2015 6:04 am
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.

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

Posted: Sat Feb 14, 2015 6:08 am
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:

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

Posted: Sat Feb 14, 2015 7:16 am
by Tormentor667
That's a good idea, I totally forgot about that feature :)

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

Posted: Sat Feb 14, 2015 8:34 am
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.

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

Posted: Sun Feb 15, 2015 10:13 am
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.

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

Posted: Sun Feb 15, 2015 10:26 am
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