Endstar LUA API Documentation
|
Allows you to access information about the current session including players, level, and game info. More...
Public Member Functions | |
Game () | |
int | GetPlayerCount () |
How many players are currently connected? | |
Context | GetPlayerByIndex (int playerIndex) |
Get a player by index. This starts at 0, and will have no gaps. Easy to use with GetPlayerCount. | |
Context | GetPlayerBySlot (int playerSlot) |
Returns the player's context currently in the requested slot. Note that if players have left there may be gaps in the slots, and that slots start at 1. The slot number is the same number you see displayed with the player name + hearts. | |
Context[] | GetPlayers () |
Get all the currently connected player's contexts! | |
string | GetGameTitle () |
string | GetGameDescription () |
string | GetLevelName () |
Gets the name of the currently loaded level. | |
string | GetLevelDescription () |
Gets the description of the currently loaded level. | |
int | GetMinPlayerCount () |
Gets the minimum number of players required to play this game. Currently unused, but will eventually be searchable and enforceable. | |
int | GetMaxPlayerCount () |
Gets the maximum number of players allowed to play this game. Currently unused, but will eventually be searchable and enforceable. | |
void | Teleport (Context instigator, Context teleportTarget, UnityEngine.Vector3 position, float rotation, int teleportType) |
Teleport a context to a position. | |
void | Teleport (Context instigator, Context teleportTarget, UnityEngine.Vector3 position, float rotation, int teleportType, bool snapPlayerCamera) |
Teleport a context to a position. | |
void | Teleport (Context instigator, Context teleportTarget, UnityEngine.Vector3 position, int teleportType) |
Teleport a context to a position. | |
void | Teleport (Context instigator, Context teleportTarget, CellReference cellReference, int teleportType) |
Teleport a context to a cell. | |
void | Teleport (Context instigator, Context teleportTarget, CellReference cellReference, int teleportType, bool snapPlayerCamera) |
Teleport a context to a cell. | |
Public Attributes | |
LuaInterfaceEvent | OnPlayerCountChanged = new() |
Subscribe to this to get updates when the number of players changes! Broadcasts the game's context and current player count. | |
LuaInterfaceEvent | OnPlayerLeft = new() |
Subscribe to this to get updates when a player leaves! Broadcasts the leaving player's context. | |
LuaInterfaceEvent | OnPlayerJoined = new() |
Subscribe to this to get updates when a player leaves! Broadcasts the newly joined player's context. | |
Allows you to access information about the current session including players, level, and game info.
Game | ( | ) |
string GetGameDescription | ( | ) |
string GetGameTitle | ( | ) |
string GetLevelDescription | ( | ) |
Gets the description of the currently loaded level.
string GetLevelName | ( | ) |
Gets the name of the currently loaded level.
int GetMaxPlayerCount | ( | ) |
Gets the maximum number of players allowed to play this game. Currently unused, but will eventually be searchable and enforceable.
int GetMinPlayerCount | ( | ) |
Gets the minimum number of players required to play this game. Currently unused, but will eventually be searchable and enforceable.
Context GetPlayerByIndex | ( | int | playerIndex | ) |
Get a player by index. This starts at 0, and will have no gaps. Easy to use with GetPlayerCount.
playerIndex |
Context GetPlayerBySlot | ( | int | playerSlot | ) |
Returns the player's context currently in the requested slot. Note that if players have left there may be gaps in the slots, and that slots start at 1. The slot number is the same number you see displayed with the player name + hearts.
playerSlot |
int GetPlayerCount | ( | ) |
How many players are currently connected?
Context[] GetPlayers | ( | ) |
Get all the currently connected player's contexts!
void Teleport | ( | Context | instigator, |
Context | teleportTarget, | ||
CellReference | cellReference, | ||
int | teleportType ) |
Teleport a context to a cell.
instigator | The source context of this change |
teleportTarget | The context to teleport |
cellReference | The Cell Reference to teleport to |
teleportType | The type of teleport as TeleportType |
void Teleport | ( | Context | instigator, |
Context | teleportTarget, | ||
CellReference | cellReference, | ||
int | teleportType, | ||
bool | snapPlayerCamera ) |
Teleport a context to a cell.
instigator | The source context of this change |
teleportTarget | The context to teleport |
cellReference | The Cell Reference to teleport to |
snapPlayerCamera | Should the teleported player's camera be set to teleport rotation? |
teleportType | The type of teleport as TeleportType |
void Teleport | ( | Context | instigator, |
Context | teleportTarget, | ||
UnityEngine.Vector3 | position, | ||
float | rotation, | ||
int | teleportType ) |
Teleport a context to a position.
instigator | The source context of this change |
teleportTarget | The context to teleport |
position | The position to teleport to |
rotation | The rotation to teleport to (0-360) |
teleportType | The type of teleport as TeleportType |
void Teleport | ( | Context | instigator, |
Context | teleportTarget, | ||
UnityEngine.Vector3 | position, | ||
float | rotation, | ||
int | teleportType, | ||
bool | snapPlayerCamera ) |
Teleport a context to a position.
instigator | The source context of this change |
teleportTarget | The context to teleport |
position | The position to teleport to |
rotation | The rotation to teleport to (0-360) |
snapPlayerCamera | Should the teleported player's camera be set to teleport rotation? |
teleportType | The type of teleport as TeleportType |
void Teleport | ( | Context | instigator, |
Context | teleportTarget, | ||
UnityEngine.Vector3 | position, | ||
int | teleportType ) |
Teleport a context to a position.
instigator | The source context of this change |
teleportTarget | The context to teleport |
position | The position to teleport to |
teleportType | The type of teleport as TeleportType |
LuaInterfaceEvent OnPlayerCountChanged = new() |
Subscribe to this to get updates when the number of players changes! Broadcasts the game's context and current player count.
LuaInterfaceEvent OnPlayerJoined = new() |
Subscribe to this to get updates when a player leaves! Broadcasts the newly joined player's context.
LuaInterfaceEvent OnPlayerLeft = new() |
Subscribe to this to get updates when a player leaves! Broadcasts the leaving player's context.