Linedef type 256
Linedef type 256, Spin-Bustable Block, Translucent, is a type of translucent floor over floor block which will shatter when a player in their spinning frames collides with it, e.g. when the player is jumping or spindashing. It can also be shattered by all of the same actions as a bustable block. Upon shattering, it generates the bustable block sprites, produces crumbling ambience (sound
sfx_crumbl), and hides inside the floor of the sector it is in. This allows it to be respawned after it is shattered by raising it back up to its former height.
The flats, floor height, and ceiling height of the FOF are determined by the flats, floor height, and ceiling height of the control sector, and the sidedefs of the FOF's walls are determined by the sidedef of the control linedef.
The light level of the control sector will determine the brightness of the shadow cast by the FOF. If the light level of the control sector is lower than that of the target sector, then it will cast a dark shadow. If the light level of the control sector is higher than that of the target sector, then the FOF will illuminate the area below it. If the light level of the control sector is equal to that of the target sector, then the FOF will not affect the light of the area below it.
The alpha value of this FOF's translucency can be changed by setting the control linedef's front side upper texture to the number symbol (#), followed by a three-digit decimal number, from 000 to 255. #000 is completely invisible, and #255 is completely opaque. Note that in the Software renderer, there are actually only eleven different values: #000–#011, #012–#037, #038–#063, #064–#088, #089–#114, #115–#139, #140–#165, #166–#191, #192–#216, #217–#242, #243–#255, where #000–#011 is invisible, and #243–#255 is opaque. The advantage of using the completely opaque values is the ability to properly render flats which contain transparent pixels.
If Flag  / Solid Midtexture / Effect 4 is checked, this block can be broken by a pushable Object. If Flag  / Repeat Midtexture / Effect 5 is checked, a linedef executor will be activated when the block is shattered. In this situation, the tag of the trigger linedef of the linedef executor to activate is determined by the length of the control linedef.
Because spin-bustable blocks turn off
FF_EXISTS when shattered, effectively making them disappear completely, they must be respawned by turning on this flag again. The most convenient way of doing this is using the Make FOF Disappear/Reappear (linedef type 445) linedef executor with Flag  / Not Climbable applied, which will immediately make the FOF reappear when executed. The Make FOF Disappear/Reappear linedef should have its front X texture offsets match the tag of the FOF's target sector in-level, and front Y texture offsets matching the tag of the FOF's control sector.
To create a timed respawning effect, the FOF's control linedef should be given Flag  / Repeat Midtexture / Effect 5 and given a length that corresponds with the tag of the trigger linedef (e.g., Continuous) to execute the Make FOF Disappear/Reappear linedef, as this then allows the FOF's destruction to execute the linedef. The Make FOF Disappear/Reappear linedef itself should then be given a delay using the Upper Unpegged flag – a back sector for the linedef is then needed to determine the delay in tics, which corresponds to the sector's ceiling height.
Alternatively, Lua is also capable of turning back on
FF_EXISTS in the FOF's flags – this requires searching through all FOFs located in the FOF's target sector to find the one you want.
Example code using "sector" as a sector_t variable, and "rover" as a ffloor_t variable, and turning on
FF_EXISTS for any FOF if it is not already applied:
for rover in sector.ffloors() if not (rover.flags & FF_EXISTS) rover.flags = $1 | FF_EXISTS end end
- Example file: ex_ld256_fofspinbustblocktranslucent.wad (MAP01)
|How to use|