Switch¶
Object used when you want to find information on targetted doors or switches such as the portals in PoK.
Forms¶
switch Switch¶
- Returns the currently targeted switch
switch Switch[ID]¶
- Returns a switch matching the provided numeric ID
switch Switch[Search]¶
-
Based on the value of
Search, return a switch:target: Return the currently targeted switchnearest: Return the nearest switch.- Otherwise, return switch by searching by name
Associated DataTypes¶
switch¶
- Data related to switches (levers, buttons, etc) in the zone
-
Members
heading
DefaultHeading¶- Heading of "closed" switch
float
DefaultX¶- X coordinate of "closed" switch
float
DefaultY¶- Y coordinate of "closed" switch
float
DefaultZ¶- Z coordinate of "closed" switch
float
Distance¶- Distance from player to switch in (x,y)
float
Distance3D¶- Distance from player to switch in (x,y,z)
heading
Heading¶- Switch is facing this heading
heading
HeadingTo¶- Direction player must move to meet this switch
int
ID¶- Switch ID
bool
IsTargeted¶- Returns TRUE if the switch is targeted
bool
LineOfSight¶- Returns TRUE if the switch is in LoS
string
Name¶- Name
bool
Open¶- True if the switch is in the "open" state (State == 1)
int
State¶- The "state" of the switch.
float
X¶- X coordinate
float
Y¶- Y coordinate
float
Z¶- Z coordinate
string
ToString¶- Same as ID
Usage¶
${Switch[foo]}
${Switch[foo].Heading}
Actions on current /doortarget¶
/echo ${Switch.Heading}
/echo ${Switch.Open}
Access the current doortarget switch datatype members directly Returns TRUE or FALSE