Difference between revisions of "Weapon (object)"

From BZFlagWiki
Jump to: navigation, search
m (fixed name parameter)
(updated link to official documentation)
 
(15 intermediate revisions by 10 users not shown)
Line 9: Line 9:
 
   position 0.0 0.0 0.0
 
   position 0.0 0.0 0.0
 
   rotation 0.0
 
   rotation 0.0
 +
  color 0
 
   tilt 0.0
 
   tilt 0.0
 
   initdelay 10.0
 
   initdelay 10.0
 
   delay 10.0 3.0 5.0 3.0
 
   delay 10.0 3.0 5.0 3.0
   type V
+
   type SW
   trigger flagcap
+
   trigger oncap
   eventteam R
+
   eventteam 1
 
  end
 
  end
 
|}
 
|}
 
Valid parameters for a weapon object are:
 
Valid parameters for a weapon object are:
*'''name''' : the name of the weapon, generally unused.
+
{|{{Prettytable}}
*'''position ''' : the position in world units for the effect to begin at
+
|-
*'''rotation ''' : the orientation in degrees for the effect to fire in.
+
| {{Hl3}} |'''Parameter'''
*'''tilt ''' : the vertical tilt in degrees for the effect to fire in.
+
| {{Hl3}} |'''Description'''
*'''initdelay ''' : the delay to wait after the server starts before the effect is triggered.
+
|-
*'''delay ''' : a list of delays to loop through after the startup delay.
+
| '''name''' || the name of the weapon, generally unused.
*'''type ''' the [[FlagCode]] for the flag effect to use for the weapon.
+
|-
*'''trigger ''' : if a delay is not used, when to trigger the flag, currently only flagcap is valid.
+
| '''position''' || the position in world units for the effect to begin at.
*'''eventteam ''' : the team to use when looking at flagcap weapons.
+
|-
 +
| '''rotation''' || the orientation in degrees for the effect to fire in.
 +
|-
 +
| '''color''' || the color the weapon should be. 0: rogue, 1: red, 2: green, 3: blue, 4: purple 5: observer, 6: rabbit - note there is no observer super bolt texture.
 +
|-
 +
| '''tilt''' || the vertical tilt in degrees for the effect to fire in.
 +
|-
 +
| '''initdelay''' || the delay to wait after the server starts before the effect is triggered.
 +
|-
 +
| '''delay''' || a list of delays to loop through after the startup delay. (optional).
 +
|-
 +
| '''type''' || the [http://bzflag.org/documentation/flags FlagCode] for the flag effect to use for the weapon. Using V or A for example would create a high speed bullet while using SW would create a shockwave.
 +
|-
 +
| '''trigger''' || if a delay is not used, when to trigger the flag, currently only oncap is valid.
 +
|-
 +
| '''eventteam''' || the team to use when looking at oncap weapons. Use numeric values 1 - red 2 - green 3 - blue 4 - purple. Explodes when the flag of that team is captured.
 +
|}
  
 
The weapon object can be used as many times as desired on a map.
 
The weapon object can be used as many times as desired on a map.
 +
The flag for the weapon must be specified in options. If a worldweapon is desired, without a corresponding flag on the ground, it can be specified without a quantity.  +f <flag>
  
 
==Appearance==
 
==Appearance==
The weapon object will produce a weapon effect that is exactly the same as similar effects produced by players.  
+
The weapon object will produce a weapon effect that is exactly the same as similar effects produced by players.
 +
 
 +
Be sure to note that if you specify an observer shot color and set the shot type to SB (SuperBullet) a white box will appear because there is no texture for an observer super bolt.
  
 
==History==
 
==History==
Line 38: Line 58:
 
==Editor Support==
 
==Editor Support==
 
The weapon object is only fully supported by the [[BZWTools]] blender plug-in.
 
The weapon object is only fully supported by the [[BZWTools]] blender plug-in.
 +
 +
==See also==
 +
* [[Comparison of map editors|map editors]]
 +
* [[Comparison of map objects|map objects]]
 +
* [https://github.com/BZFlag-Dev/bzflag/blob/2.4/plugins/wwzones/README.wwzones.txt Wwzones] - a plug-in which can be used to create landmines, booby traps using world weapons.
  
 
[[Category:Map Making]]
 
[[Category:Map Making]]
 
[[Category:Map Objects]]
 
[[Category:Map Objects]]

Latest revision as of 19:16, 17 March 2017

A weapon object is a BZW map structure that defines a fixed weapon effect. This is also called a world weapon.

Code[edit]

The code for a weapon object is as follows

weapon
 name example_weapon
 position 0.0 0.0 0.0
 rotation 0.0
 color 0
 tilt 0.0
 initdelay 10.0
 delay 10.0 3.0 5.0 3.0
 type SW
 trigger oncap
 eventteam 1
end

Valid parameters for a weapon object are:

Parameter Description
name the name of the weapon, generally unused.
position the position in world units for the effect to begin at.
rotation the orientation in degrees for the effect to fire in.
color the color the weapon should be. 0: rogue, 1: red, 2: green, 3: blue, 4: purple 5: observer, 6: rabbit - note there is no observer super bolt texture.
tilt the vertical tilt in degrees for the effect to fire in.
initdelay the delay to wait after the server starts before the effect is triggered.
delay a list of delays to loop through after the startup delay. (optional).
type the FlagCode for the flag effect to use for the weapon. Using V or A for example would create a high speed bullet while using SW would create a shockwave.
trigger if a delay is not used, when to trigger the flag, currently only oncap is valid.
eventteam the team to use when looking at oncap weapons. Use numeric values 1 - red 2 - green 3 - blue 4 - purple. Explodes when the flag of that team is captured.

The weapon object can be used as many times as desired on a map. The flag for the weapon must be specified in options. If a worldweapon is desired, without a corresponding flag on the ground, it can be specified without a quantity. +f <flag>

Appearance[edit]

The weapon object will produce a weapon effect that is exactly the same as similar effects produced by players.

Be sure to note that if you specify an observer shot color and set the shot type to SB (SuperBullet) a white box will appear because there is no texture for an observer super bolt.

History[edit]

The weapon object was added in v2.0.0.

Editor Support[edit]

The weapon object is only fully supported by the BZWTools blender plug-in.

See also[edit]