Weapon Object
Work In Progress
We are working on updating and improving this documentation. Some information may be missing or inaccurate.
Description
World weapons are weapons that are not fired by players. Instead, the game server itself fires them.
Attributes
| Syntax | Description |
|---|---|
| name <name> |
Sets the name of this object. In many cases, this does not have any purpose and may just be useful for documenting what the object is for. In some case, like for teleporters, this can be used to reference the object from other objects. |
| position <x> <y> <z> |
This controls the absolute position of the object, lined up with the bottom center of the object. The center of the world, at ground level, is 0 0 0. |
|
rot <angle> rotation <angle> |
Objects can be rotated on the Z axis, with the angle being specified in degrees. Extremely old worlds may use radians and will need to be converted, since BZFlag 1.7e0 used radians, and this was changed to use degrees in BZFlag 1.7e4. |
| initdelay <seconds> |
The initial delay after starting a server before a weapon starts firing. This defaults to 10 seconds. This is useful for coordinating when multiple weapons fire relative to each other. |
|
delay <seconds...> |
The delay(s) between shooting. The minimum value is 0.1 seconds. Multiple delay values can be included after
the delay keyword. For instance, |
| type <flag_abbreviation> |
Defines the type of weapon that is fixed. This defaults to a Null flag, which means it behaves like a tank shooting without any flag held. Most flag types won't have any effect here. Ones that will include G (Genocide), GM (Guided Missile), L (Laser), MG (Machine Gun), Rapid Fire (F), Ricochet (R), SB (Super Bullet), SW (ShockWave), and TH (Thief). |
| color <team_index> |
Sets the team color of the world weapon. This defaults to the Rogue team. |
| tilt <angle> |
Controls the angle that the weapon fires, in degrees, with 0 being the default shooting forward level to the ground. |
|
trigger oncap trigger onspawn trigger ondie |
Trigger this weapon on a specific event. A common use for this is oncap spawns to clear a team base of opposing players when that team's flag is captured to prevent spawn kills. |
| eventteam <team_index> |
Restricts the trigger to a specific team. |
Syntax Examples
weapon
position 0 -15 10
tilt -45
initdelay 30
delay 1 20
end
weapon
position 0 0 10
tilt -45
initdelay 31
delay 1 20
type R
end
weapon
position 0 15 10
tilt -45
initdelay 32
delay 1 20
type L
end
This content is maintained on GitHub. We welcome any feedback and improvements!