Teleporter Object
Work In Progress
We are working on updating and improving this documentation. Some information may be missing or inaccurate.
The teleporter object creates a portal gate that can be linked to another gate to provide quick transportation. Each side of a teleporter may be independently linked. If a link does not exist for the side of a teleporter, it is possible to shoot or drive through the teleporter.
TODO: CHECK THESE NUMBERS AND CHECK IF WE LEAVE SIZE OUT
Default sizes
Teleporters have a default size. This is used when the size attribute is left out and for randomly generated worlds.
| Dimension | Calculation for default size | Default calculated size |
|---|---|---|
| X | 0.5 * _teleporterWidth | 0.56 |
| Y | _teleporterBreadth | 4.48 |
| Z | 2.0 * _teleporterHeight | 20.16 |
| Border Width | X * 2.0 | 1.12 |
Referencing teleporters
By default, a teleporter doesn't link anywhere else (other than the other side, technically). To link a teleporter to a destination, a link object must be created. Teleporters can optionally include a name. If you decide to name your teleporters, you must use that name when creating links. The numeric indexes do not work for named teleporters.
Attributes
The teleporter object supports the following 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. |
| size <x> <y> <z> |
This controls the size of the object. It accepts three floating point numbers for the X, Y, and Z size of the object. Z is up. |
|
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. |
| drivethrough |
This allows tanks to drive through the object. |
| shootthrough |
This allows bullets and beam weapons to pass through the object. |
| passable |
This combines the effects of both the drivethrough and shootthrough attributes. |
| ricochet |
On a server with ricochet disabled, this attribute selectively enables ricochet on this object. |
| border <width> |
This controls the size of the border around the left, right, and top of a teleporter gate. |
| horizontal |
This changes a teleporter to be horizontal instead of vertical. However, this was never fully implemented, so the teleporter does not function in this mode, and collision is a bit buggy. It is suggested to avoid using this. |
When using drivethrough, shootthrough, passable, and/or ricochet, keep in mind that this will only apply to the border of the teleporter. The actual portal will still behave as normal. Also, when drivethrough or passable is used, there is still collision at the edge of the portal. (TODO: CHECK IF THE TOP HAS COLLISION SO YOU COULD SIT ON TOP, AND CHECK FROM DIFFERENT ANGLES)
Syntax Examples
Here is a simple example of two teleporters with a single link, using index referencing (meaning, no named teleporters).
teleporter
position 20 0 0
end
teleporter
position -20 0 0
end
link
from 0
to 2
end
This content is maintained on GitHub. We welcome any feedback and improvements!