Page 1 of 1
Questions on breakable glass
Posted: Fri Jan 13, 2006 8:06 am
by ReX
1. Has anyone used the GLASSBREAK special? My version of ACS does not seem to support it, and no documentation is available on the bitset number and available arguments. (The wiki was not much of a help to me.) Moreover, it seems that the textures would first need to be designated as switches in the ANIMDEFS lump, which seems to be more of a pain than simply using a script.
2. If using a script, do the individual glass shards need to be spawned separately (i.e., using separate mapspots for each shard) or is there a way to script all shards appearing with a single line of code?
Muchas gracias.
Posted: Fri Jan 13, 2006 9:31 am
by Graf Zahl
The Glassbreak special is taken directly from Strife. The documentation in the Wiki is all that has to be said. There is only the one parameter which specifies whether glass shards are being spawned or not.
The textures have to be defined as a switch because the engine has to know what's the name of the broken counterpart and it also uses the switch sound to play a breaking glass sound. The big advantage of it is that you can create a breakable window just by assigning a special to the linedef. With scripts you still need a Line_SetIdentification special that then has to be replaced inside the script with the actual script trigger - and you need a separate line ID for each window so in the end the Strife method is certainly less work, especially if you have many windows using the same texture.
The glass shard spawning is another plus. As you guessed, you'd have to set up a map spot for each glass shard if you wanted to do it in a script. The way it is now you just have to add the sprites and all is done automatically.
Posted: Fri Jan 13, 2006 12:48 pm
by ReX
Thanks for the answers, Graf.
Yes, I had realized the "one-stop shop" advantages of the special right away. I was really trying to debate with myself if the additional work on the TEXTURES lump was worth the benefit if there was only one instance of breakable glass. But thanks for pointing out the advantages anyway.
Now here's a set of follow-up questions:
- 1. Is this how the special would look if it was written in a script:
This will spawn the glass shards. To prevent spawning the argument would be 1?
2. The config for my editor (WadAuthor) does not include support for this special, and so I must either edit the raw data for the linedef or resort to a script. If I was editing the raw data I guess I would assign the special number 49, and make the first argument 0?
3. If I choose to use a script, what is the mechanism to identify the linedef? Or can this special currently not be implemented via a script?
Thanks again.
Posted: Fri Jan 13, 2006 2:38 pm
by Graf Zahl
Here's the answers:
1. Correct. Originally it always spawned the shards and that's why there's a negative logic.
2. The config for your editor is a text file and it should be easy to add this special. You can get an updated version from my GZDoom site. If you ignore the 3D floor linedef type it can also be used for ZDoom and contains all the latest additions. You can also add this to your specials definition list:
Code: Select all
0x021 1 ForceField( -, -, -, -, - )
0x022 1 ClearForceField(tag, -, -, -, - )
0x031 1 GlassBreak(nojunk, -, -, -, - )
but I still recommend to get the new version because it contains other useful stuff as well.
3. Since it has no tag it always works on the activating linedef.
Posted: Fri Jan 13, 2006 4:34 pm
by Necromage
Since we are on the subject, how do you specify which shards are spawned with the breakable line special? For instance you probably want to use different shards for a glass windows and stain-glass windows.
Posted: Fri Jan 13, 2006 7:07 pm
by NetNomad
Hmm, I'd like to know if there is a simple example of this somewhere out there. I was playing around with "breaking glass" last night, but only in the form of texture switching on the line... no real debris or anything. Is there an example wad somewhere? WadAuthor has one, but it's for Hexen I think... when I load it up in ZDoom, ZDoom cannot seem to make sense of it.
Posted: Sat Jan 14, 2006 3:29 am
by Graf Zahl
NecroMage wrote:Since we are on the subject, how do you specify which shards are spawned with the breakable line special? For instance you probably want to use different shards for a glass windows and stain-glass windows.
You can't. That might be something that could be added as a second parameter.
Posted: Sat Jan 14, 2006 8:50 pm
by Necromage
I guess its the long way for me.
