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.
Questions on breakable glass
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.
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49226
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
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.
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.
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:
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?
Code: Select all
GlassBreak (0);
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?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49226
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
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:
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.
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, -, -, -, - )
3. Since it has no tag it always works on the activating linedef.
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.