This wiki is archived and useful information is being migrated to the main bzflag.org website

Editing Box

Jump to: navigation, search

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 parallelepiped in the world.
+
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|thumb|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
{|{{Prettytable}}
+
<properties>
|-
+
position=defines the center of the box in X and Y and the bottom of the box in Z.
| {{Hl3}} |'''Parameter'''
+
rotation=defines a rotation around the Z axis for the box, in degrees.
| {{Hl3}} |'''Description'''
+
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>
| '''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.
+
|}
+
 
+
'''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.
+
 
+
{|
+
|
+
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]
+
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.
  
 
==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) can be different. The size depends on the chosen display quality setting in the options menu.
+
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 48:
 
|}
 
|}
  
{|{{Prettytable}}
+
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.
|-
+
| {{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.
+
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==

Please note that all contributions to BZFlagWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BZFlagWiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)

Templates used on this page:

Retrieved from "https://wiki.bzflag.org/Box"