position=defines the center of the box in X and Y and the bottom of the box in Z.
|-
rotation=defines a rotation around the Z axis for the box, in degrees.
| {{Hl3}} |'''Parameter'''
size=defines the distance from the center to the side of the box in X and Y, and the total height of the box in Z.
| {{Hl3}} |'''Description'''
</properties>
|-
| '''position''' || defines the center of the box in X and Y and the bottom of the box in Z.
|-
| '''rotation''' || defines a rotation around the Z axis for the box, in degrees.
|-
| '''size''' || defines the distance from the center to the side of the box in X and Y, and the total height of the box in Z.
|-
| '''drivethrough''' || makes the box drivethrough, meaning tanks may drive through it.
|-
| '''shootthrough''' || makes the box shootthrough, meaning tanks may shoot through it.
|-
| '''ricochet''' || changes the box so shots bounce off it; shootthrough takes presedence.
|}
'''In versions 2.0.8 and older, boxes do not support''' [[material]], custom textures, or [[Physics_Drivers|physics drivers]]. The [[meshbox]] object replaces the box object and supports all these features and capabilities.
Boxes do not support [[Material]], [[Texture Matrix]], or [[Physics Drivers]]. The [[Meshbox]] object replaces the box object and supports these features.
{|
|
box
position 0 40 0
size 5 5 10
rotation 0
'''top matref something1'''
'''sides matref something2'''
'''y+ matref something3'''
'''y- matref something4'''
'''bottom matref something6'''
'''texsize 1 1'''
'''phydrv physics_driver_name'''
end
|}
{|{{Prettytable}}
|-
| {{Hl3}} |'''Parameter'''
| {{Hl3}} |'''Description'''
|-
| '''x+ , x-, y+ , y-, z+, and z-''' || Assigns a [[material]] to a specific side of the box.
|-
| '''top''' || Assigns a [[material]] to the top (z ) of the box.
|-
| '''bottom''' || Assigns a [[material]] to the bottom (z-) of the box.
|-
| '''sides or outside''' || Assigns a [[material]] to the x , x-, y , and y- sides of the box.
|-
| '''texsize''' || Texture sizes, changes how the textures scale on the object.
|-
| '''texoffset''' || Controls the offset of the texture.
|-
| '''phydrv''' || Reference to a predefined [[physics|physics driver]].
|}
More information that needs to be merged into the wiki, as well as the BZW manfile: [http://my.bzflag.org/bb/viewtopic.php?t=8199 Smart Boxes and Pyramids]
==Appearance==
==Appearance==
Box objects by default have a red brick texture on the vertical sides, and a white plaster texture on the top and bottom.
Box objects by default have a red brick texture on the vertical sides, and a white plaster texture on the top and bottom. A box of height 0 on ground level ''is'' visible.
The texsizes of boxes and boxes made of meshes (e.g. meshbox and box with one of the new properties) can be different. The size depends on the chosen display quality setting in the options menu.
{|{{Prettytable}}
|-
| {{Hl3}} |'''Box type'''
| {{Hl3}} |'''texsize'''
|-
|box (old style box)
| -2.0f -2.0f -8.0f -8.0f
|-
|meshbox
| -8.0f -8.0f -8.0f -8.0f
|-
|box with one meshbox property
| -8.0f -8.0f -8.0f -8.0f
|}
{|{{Prettytable}}
|-
| {{Hl3}} |'''Box type'''
| {{Hl3}} |'''texsize with lower quality setting than in the above table'''
|-
|box (old style box)
| -2.0f -2.0f -8.0f -8.0f
|-
|meshbox
| -2.0f -2.0f -8.0f -8.0f
|-
|box with one meshbox property
| -2.0f -2.0f -8.0f -8.0f
|}
This will cause the textures to scale differently for some players in X and Z axis. This can not be solved by adjusting the texsizes in map. The advice is not to mix old style boxes, meshboxes and boxes with one meshbox property, all in the same map.
==History==
==History==
Latest revision as of 05:39, 2 November 2025
A Box is a BZW map structure that defines a rectilinear parallelepiped in the world.
defines the center of the box in X and Y and the bottom of the box in Z.
rotation
defines a rotation around the Z axis for the box, in degrees.
size
defines the distance from the center to the side of the box in X and Y, and the total height of the box in Z.
drivethrough
makes the box drivethrough, meaning tanks may drive through it.
shootthrough
makes the box shootthrough, meaning tanks may shoot through it.
ricochet
changes the box so shots bounce off it; shootthrough takes presedence.
In versions 2.0.8 and older, boxes do not supportmaterial, custom textures, or physics drivers. The meshbox object replaces the box object and supports all these features and capabilities.
box
position 0 40 0
size 5 5 10
rotation 0
top matref something1sides matref something2y+ matref something3y- matref something4bottom matref something6texsize 1 1phydrv physics_driver_name
end
More information that needs to be merged into the wiki, as well as the BZW manfile: Smart Boxes and Pyramids
Appearance
Box objects by default have a red brick texture on the vertical sides, and a white plaster texture on the top and bottom. A box of height 0 on ground level is visible.
The texsizes of boxes and boxes made of meshes (e.g. meshbox and box with one of the new properties) can be different. The size depends on the chosen display quality setting in the options menu.
Box type
texsize
box (old style box)
-2.0f -2.0f -8.0f -8.0f
meshbox
-8.0f -8.0f -8.0f -8.0f
box with one meshbox property
-8.0f -8.0f -8.0f -8.0f
Box type
texsize with lower quality setting than in the above table
box (old style box)
-2.0f -2.0f -8.0f -8.0f
meshbox
-2.0f -2.0f -8.0f -8.0f
box with one meshbox property
-2.0f -2.0f -8.0f -8.0f
This will cause the textures to scale differently for some players in X and Z axis. This can not be solved by adjusting the texsizes in map. The advice is not to mix old style boxes, meshboxes and boxes with one meshbox property, all in the same map.
History
The box is one of the original objects supported by BZFlag and has been a mainstay of maps since the very beginning. Boxes are heavily used by the software when generating random maps. In v2.0.0 the box was replaced with the meshbox object to support Materials and Physics Drivers. The original box definition was left unchanged, in order to maintain functional compatibility for older maps.