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

Difference between revisions of "Teleporter"

From BZFlagWiki
Jump to: navigation, search
((Very Minor) The 'end' got chopped off the material name.)
(Code: added wiki table)
 
(7 intermediate revisions by 5 users not shown)
Line 5: Line 5:
 
[[Image:Teleporter.jpg|frame|right|Teleporter with the default textures]]
 
[[Image:Teleporter.jpg|frame|right|Teleporter with the default textures]]
 
The code for a teleporter object is as follows
 
The code for a teleporter object is as follows
{|
 
|
 
  teleporter
 
  name example_teleporter_name
 
  position 0.0 0.0 0.0
 
  size 0.125 5 20
 
  rotation 0.0
 
  border 1.12
 
  end
 
|}
 
 
OR
 
 
 
{|
 
{|
 
|
 
|
Line 29: Line 16:
  
 
Valid parameters for a teleporter are
 
Valid parameters for a teleporter are
<properties>
+
{|{{Prettytable}}
name=defines a name for the teleport (2.0+ only). although rarely used, it proves helpful to use these for linking teleports by [[link]] object.
+
|-
position=defines the center of the teleporter in X and Y and the bottom of the teleporter in Z.
+
| {{Hl3}} |'''Parameter'''
rotation=defines a rotation around the Z axis for the teleporter, in degrees.
+
| {{Hl3}} |'''Description'''
size=defines the distance from the center to the side of the teleporter in X and Y, and the total height of the teleporter in Z.
+
|-
border=defines the yellow caution border around the teleporter entry point.
+
| '''name''' || defines a name for the teleport (3.0+ only - put the name after the word 'teleporter' in 2.0). This is used when [[Link|linking]] teleporters together.
</properties>
+
|-
 +
| '''position''' || defines the center of the teleporter in X and Y and the bottom of the teleporter in Z.
 +
|-
 +
| '''rotation''' || defines a rotation around the Z axis for the teleporter, in degrees.
 +
|-
 +
| '''size''' || defines the distance from the center to the side of the teleporter in X and Y, and the total height of the teleporter in Z.
 +
|-
 +
| '''border''' || defines the yellow caution border around the teleporter entry point.
 +
|}
  
 
Note: Teleporters are entered through X. As such, it is recommended to keep X fairly small (.125 works well). However, if X is zero, it will cause BZFlag bugs. If you need to enter a teleport from Y, rotating it 90 degrees is the suggested solution. X shouldn't be larger than the border size either, or else the shimmering portal will extend outside the teleporter frame, and create an invisible wall in between. Teleports are 2-sided, not 4.
 
Note: Teleporters are entered through X. As such, it is recommended to keep X fairly small (.125 works well). However, if X is zero, it will cause BZFlag bugs. If you need to enter a teleport from Y, rotating it 90 degrees is the suggested solution. X shouldn't be larger than the border size either, or else the shimmering portal will extend outside the teleporter frame, and create an invisible wall in between. Teleports are 2-sided, not 4.
Line 42: Line 37:
 
Teleporters appear with a yellow/black caution texture on the outer border of the object and with a pulsing texture in the middle.
 
Teleporters appear with a yellow/black caution texture on the outer border of the object and with a pulsing texture in the middle.
  
  #Teleporters may be textured with a magic material name , LinkMaterial.
+
  #Teleporters may be textured with a magic material name , LinkMaterial.  
 +
#There is no need for "matref LinkMaterial" in the teleporter definition.
 +
 
   dynamicColor
 
   dynamicColor
   name LinkMaterial
+
   name LinkDynCol
 
   red limits 0 0.25
 
   red limits 0 0.25
 
   red sinusoid 2 0 1
 
   red sinusoid 2 0 1
Line 54: Line 51:
 
  end  
 
  end  
 
  textureMatrix
 
  textureMatrix
   name LinkMaterial
+
   name LinkTrix
 
   shift 0 -0.05  
 
   shift 0 -0.05  
 
   center 0 0
 
   center 0 0
Line 62: Line 59:
 
   nolighting
 
   nolighting
 
   addtexture  telelink.png
 
   addtexture  telelink.png
     texmat LinkMaterial
+
     texmat LinkTrix
     dyncol LinkMaterial
+
     dyncol LinkDynCol
 
  end
 
  end
  
Line 72: Line 69:
 
Supported by all known editors.
 
Supported by all known editors.
  
===Hints===
+
 
Most beginners have problems trying to change the size of a teleporter. Don't change the 0.125. It's there for a reason.
+
size 0.125 Y Z
+
+
 
[[category:Map Making]]
 
[[category:Map Making]]
 
[[category:Map Objects]]
 
[[category:Map Objects]]

Latest revision as of 03:47, 3 December 2016

A Teleporter is a BZW map structure that defines a object which transports the user to another teleporter in a different part of the world/map. To be used effectively, one or more teleporters must be combined with links.

Code[edit]

Teleporter with the default textures

The code for a teleporter object is as follows

 teleporter example_teleporter_name
  position 0.0 0.0 0.0 
  size 0.125 5 20
  rotation 0.0
  border 1.12
 end 

Valid parameters for a teleporter are

Parameter Description
name defines a name for the teleport (3.0+ only - put the name after the word 'teleporter' in 2.0). This is used when linking teleporters together.
position defines the center of the teleporter in X and Y and the bottom of the teleporter in Z.
rotation defines a rotation around the Z axis for the teleporter, in degrees.
size defines the distance from the center to the side of the teleporter in X and Y, and the total height of the teleporter in Z.
border defines the yellow caution border around the teleporter entry point.

Note: Teleporters are entered through X. As such, it is recommended to keep X fairly small (.125 works well). However, if X is zero, it will cause BZFlag bugs. If you need to enter a teleport from Y, rotating it 90 degrees is the suggested solution. X shouldn't be larger than the border size either, or else the shimmering portal will extend outside the teleporter frame, and create an invisible wall in between. Teleports are 2-sided, not 4.

Appearance[edit]

Teleporters appear with a yellow/black caution texture on the outer border of the object and with a pulsing texture in the middle.

#Teleporters may be textured with a magic material name , LinkMaterial. 
#There is no need for "matref LinkMaterial" in the teleporter definition.

 dynamicColor
  name LinkDynCol
  red limits 0 0.25
  red sinusoid 2 0 1
  green limits 0 0.25
  green sinusoid 2 0.666667 1
  blue limits 0 0.25
  blue sinusoid 2 1.33333 1
  alpha limits 0.75 0.75
end 
textureMatrix
  name LinkTrix
  shift 0 -0.05 
  center 0 0
end
material  
name LinkMaterial
  nolighting
  addtexture   telelink.png
    texmat LinkTrix
    dyncol LinkDynCol 
end

History[edit]

The teleporters first appeared in BZFlag 1.0.0. In BZFlag 2.0.0, they were redesigned, introducing the name field, making link creation easier for designers.

Editor Support[edit]

Supported by all known editors.