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

Difference between revisions of "Group"

From BZFlagWiki
Jump to: navigation, search
m (Category:Map_making to Category:Map Making)
(Code: added wiki table)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
A group will recall map objects within a define object. I must be used after the define object in question.
+
The group object allows a map-maker to bring together a number of elements and refer to them as a single object. The group of elements is created in the [[define]] object and then called by name with the group object.  The group of elements can then be placed, copied, and/or modified as a whole instead of having to re-create separate objects.  Group creates an "instance" of something defined.
  
Group goes hand-in-hand with the [[define]] object.
+
Unlike most other objects, the group object can come before the definition in the bzw file.  This may help make the bzw file more readable.  
  
 
== Code ==
 
== Code ==
Line 9: Line 9:
 
   shift 0 0 0  
 
   shift 0 0 0  
 
   scale 1 1 1
 
   scale 1 1 1
 +
  rotation 0
 
   shear 0 0 0
 
   shear 0 0 0
 
   spin 0 0 0 0
 
   spin 0 0 0 0
Line 20: Line 21:
 
|}
 
|}
 
The valid parameters for groups are:
 
The valid parameters for groups are:
 +
{|{{Prettytable}}
 +
|-
 +
| {{Hl3}} |'''Parameter'''
 +
| {{Hl3}} |'''Description'''
 +
|-
 +
| '''shift''' || Shift the group (repeatable).
 +
|-
 +
| '''scale''' || Scale the group (repeatable).
 +
|-
 +
| '''rotation''' || Rotate the group (in degrees).
 +
|-
 +
| '''shear''' || Shear the group (repeatable).
 +
|-
 +
| '''spin''' || Spin the group (repeatable).
 +
|-
 +
| '''team''' || Redefine all [[base]] colors within group.
 +
|-
 +
| '''tint''' || Hierarchically tints objects within group.
 +
|-
 +
| '''drivethrough''' || Make all objects in group drivethrough.
 +
|-
 +
| '''shootthrough''' || Make all objects in the group shootthrough.
 +
|-
 +
| '''phydrv''' || Apply [[physics]] to all objects/faces within group.
 +
|-
 +
| '''matref''' || Apply [[material]] to all objects/faces within group.
 +
|}
  
'''Shift''': Shift the group (repeatable)
+
An in-depth explanation of the 3d-transformations of shift, scale, and shear can be found [http://kapsi.fi/jpa/stuff/bzw/transformations.php here]
 
+
'''Scale''': Scale the group (repeatable)
+
 
+
'''Shear''': Shear the group (repeatable)
+
 
+
'''Spin''': Spin the group (repeatable)
+
 
+
'''team''': Redefine all [[base]] colors within group.
+
 
+
'''tint''': Hierarchically tints objects within group.
+
 
+
'''drivethrough''': Make all objects in group drivethrough.
+
 
+
'''shootthrough''': Make all objects in the group shootthrough.
+
 
+
'''phydrv''': Apply [[physics]] to all objects/faces within group.
+
 
+
'''matref''': Apply [[material]] to all objects/faces within group.
+
  
 
== Editor Support ==
 
== Editor Support ==
There are currently no supported editors: groups are normally most useful when editing by hand.
+
There are currently no supported editors: groups are normally most useful when editing by hand.  
  
 
==History==
 
==History==

Latest revision as of 03:10, 3 December 2016

The group object allows a map-maker to bring together a number of elements and refer to them as a single object. The group of elements is created in the define object and then called by name with the group object. The group of elements can then be placed, copied, and/or modified as a whole instead of having to re-create separate objects. Group creates an "instance" of something defined.

Unlike most other objects, the group object can come before the definition in the bzw file. This may help make the bzw file more readable.

Code[edit]

group my_group
  shift 0 0 0 
  scale 1 1 1
  rotation 0
  shear 0 0 0
  spin 0 0 0 0
  team 0
  tint 1 1 1 1
  drivethrough
  shootthrough
  phydrv my_phydrv
  matref my_material
end

The valid parameters for groups are:

Parameter Description
shift Shift the group (repeatable).
scale Scale the group (repeatable).
rotation Rotate the group (in degrees).
shear Shear the group (repeatable).
spin Spin the group (repeatable).
team Redefine all base colors within group.
tint Hierarchically tints objects within group.
drivethrough Make all objects in group drivethrough.
shootthrough Make all objects in the group shootthrough.
phydrv Apply physics to all objects/faces within group.
matref Apply material to all objects/faces within group.

An in-depth explanation of the 3d-transformations of shift, scale, and shear can be found here

Editor Support[edit]

There are currently no supported editors: groups are normally most useful when editing by hand.

History[edit]

The group definition object was added with the v2.0.0 release of BZFlag.