This wiki is archived and useful information is being migrated to the main bzflag.org website
Editing Box
Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to copy and paste your text into a text file and save it for later.
The administrator who locked it offered this explanation: Archived wiki
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | A Box is a [[BZW]] map structure that defines a rectilinear | + | A Box is a [[BZW]] map structure that defines a rectilinear parellepiped in the world. |
==Code== | ==Code== | ||
− | [[Image:BoxeAppearance.png|thumbnail|399px|right|Default boxes]] | + | [[Image:BoxeAppearance.png|thumbnail|399px|right|Default boxes in [[BZFlag_2.2|2.2]]]] |
The code for a box object is as follows | The code for a box object is as follows | ||
{| | {| | ||
Line 13: | Line 13: | ||
|} | |} | ||
Valid parameters for a box are | Valid parameters for a box are | ||
− | + | <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. | |
− | + | </properties> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
'''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. | '''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. | ||
+ | |||
+ | '''However, as of June 6, 2006 (SVN revision 13013, version 2.0.9)''', bzfs will convert the box object to a mesh when necessary. This feature allows them to be textured and have physics drivers assigned to them. | ||
{| | {| | ||
Line 35: | Line 31: | ||
'''top matref something1''' | '''top matref something1''' | ||
'''sides matref something2''' | '''sides matref something2''' | ||
− | '''y+ | + | '''y+ matref something3''' |
'''y- matref something4''' | '''y- matref something4''' | ||
'''bottom matref something6''' | '''bottom matref something6''' | ||
Line 41: | Line 37: | ||
'''phydrv physics_driver_name''' | '''phydrv physics_driver_name''' | ||
end | end | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | + | <properties> | |
+ | 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]]. | ||
+ | </properties> | ||
==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. A box of height 0 on ground level ''is'' visible. | 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) | + | The texsizes of boxes and boxes made of meshes (e.g. meshbox and box with one of the new properties) are different. |
+ | |||
+ | {| | ||
+ | |+ | ||
+ | |- texsize | ||
+ | |- Old style boxes | ||
+ | |- -2.0f -2.0f -8.0f -8.0f | ||
+ | |} | ||
{|{{Prettytable}} | {|{{Prettytable}} | ||
Line 84: | Line 76: | ||
|} | |} | ||
− | + | This will cause the textures to scale differently in X and Z axis. Same values will cause textures in Y axis (vertical axis) to scale the same way. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | In [[BZFlag_2.2|BZFlag 2.2]] all 3 type of boxes will use "texsize -8.0f -8.0f -8.0f -8.0f". | |
==History== | ==History== |