Skip to content

Player functions

Ondolin edited this page Mar 10, 2021 · 2 revisions

There are two types of player functions.

  1. functions on specific players
  2. global functions

Character specific functions

There is a hole article on those functions here.

Global functions

Those functions are located in torchly.players.

Function name return value parameters description
add void Player add a new Player
getCharactersByPlayerID Character[] id: string returns all characters controlled by the player with the provided id
forceUpdatePlayers void - query players from backend, even if there is no subscription trigger
getByID Player OR undefind  id: string eturns the player with the the provided id or undefined if the is none
subscribeChanges void id: string, callback: Function will get executed if any character changes
unsubscribeChanges void id: string, callback: Function unsubscribed callbacks from above
Clone this wiki locally