opx_infinityteleports
Client
Last updated on
The teleports contract on the client — the pad under the player, and using it.
local teleports = OPX.Api.Get('teleports')From client code inside opx_infinity.
Nearest
The entrance the player is standing on.
teleports.Nearest()Returns
Result—{ key, leg, label, allowed }; errorteleports.noSuchTeleport
Entrances
The last list the server sent.
teleports.Entrances()Returns
Result—{ entrances }, keyedkey .. '\1' .. leg
Use
Same as pressing the key. "Ok" means sent; the result arrives on opx:on:teleports:decision.
teleports.Use(origin)Parameters
- origin?:
string- The caller's name, reported back as
source. Default'key'.
- The caller's name, reported back as
Returns
{ ok = true, key, leg, source }, or{ ok = false, error }with a locale key:error.noPermission(input captured),teleports.busy(a progress bar is up),teleports.noSuchTeleport,teleports.inFlight,teleports.refused
local sent = teleports.Use('mymodule')
if not sent.ok then print(sent.error) endState
Counts and the current key label.
teleports.State()Returns
Result—{ entrances, markers, nearest, leg, allowed, shown, asking, key }