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

Difference between revisions of "Link"

From BZFlagWiki
Jump to: navigation, search
(New page: A Link is a BZW object whichs creates a link (route) between two teleporters. ==Code== link name example_link # this will link all teleporters randomly to all o...)
 
(Code: improved content)
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
A Link is a BZW object whichs creates a link (route) between two [[teleporter|teleporters]].
+
A Link is a BZW object which creates a link (route) between two [[Teleporter|teleporters]].
  
 +
Links go in hand with [[Teleporter|teleporters]].
 +
{|
 +
|
 
==Code==
 
==Code==
 +
The code for a link object is as follows.
 +
{|
 +
|
 
   link  
 
   link  
     name example_link  
+
     name example_link
    # this will link all teleporters randomly to all other teleporters
+
 
     from *  
 
     from *  
 
     to *  
 
     to *  
 
   end
 
   end
 +
|}
 +
Valid parameters for a link are:
 +
{|{{Prettytable}}
 +
|-
 +
| {{Hl3}} |'''Parameter'''
 +
| {{Hl3}} |'''Description'''
 +
|-
 +
| '''from''' || From what [[Teleporter|teleporters]].
 +
|-
 +
| '''to''' || To what [[Teleporter|teleporters]].
 +
|}
  
Valid parameters for a teleproter are
+
In either of the from/to parameters, "*" or "?" can be used to make multiple matches. To specify which side of the teleporter you are linking you can use the ":f" (forward) or ":b" (backward) after the name of the teleporter. Ex: tele:f
  
*'''from'''; From what teleporter.
+
==Links for groups==
*'''to'''; To what teleporter.
+
  
In either of the from/to parameters, "*" or "?" can be used to make multiple matches. To specify which side of the teleporter you are linking you can use the ":f" (forward) or ":b" (backward) after the name of the teleporter. Ex: tele:f
+
Links for [[Teleporter]] done inside a [[define]] are done by naming your [[group]].
 +
 
 +
 
 +
 
 +
define blah
 +
 +
 +
teleporter tele
 +
position 0 0 0
 +
size .125 10 10
 +
border 1.5
 +
end
 +
 +
enddef #blah
 +
 +
 +
group blah
 +
name green #important part
 +
shift 200 200 0
 +
end
 +
 +
group blah
 +
name red  #important part
 +
shift -200 -200 0
 +
end
 +
 +
link
 +
from green:tele:*
 +
to red:tele:*
 +
end
 +
 +
link
 +
from red:tele:*
 +
to green:tele:*
 +
end
 +
 
 +
 
 +
Your group must have a name as a reference.
  
 
==History==
 
==History==
Line 20: Line 72:
 
==Editor Support==
 
==Editor Support==
 
The link object is supported by all known editors.
 
The link object is supported by all known editors.
 +
 +
[[Category: Map Making]]
 +
[[Category: Map_Objects]]

Latest revision as of 03:19, 3 December 2016

A Link is a BZW object which creates a link (route) between two teleporters.

Links go in hand with teleporters.

Code[edit]

The code for a link object is as follows.

 link 
   name example_link
   from * 
   to * 
 end

Valid parameters for a link are:

Parameter Description
from From what teleporters.
to To what teleporters.

In either of the from/to parameters, "*" or "?" can be used to make multiple matches. To specify which side of the teleporter you are linking you can use the ":f" (forward) or ":b" (backward) after the name of the teleporter. Ex: tele:f

Links for groups[edit]

Links for Teleporter done inside a define are done by naming your group.


define blah


teleporter tele
position 0 0 0
size .125 10 10
border 1.5
end

enddef #blah


group blah
name green #important part
shift 200 200 0
end

group blah
name red  #important part
shift -200 -200 0
end

link 
from green:tele:*
to red:tele:*
end

link
from red:tele:*
to green:tele:*
end 


Your group must have a name as a reference.

History[edit]

Editor Support[edit]

The link object is supported by all known editors.