Shared
Client.
Using Cosmoble
In order to begin using Cosmoble you will first need to fetch it, you can do this using require()
.
Getting a Cosmoble's Data
When you want to get the Cosmoble data via client, use the get
and provide a Cosmoble name in order to get it, if data exists it will return a table containing it.
It is not recommended to use this function a lot, a cache is recommended.
Connecting to a Cosmoble
When connecting to a Cosmoble via client, use the connectCosmoble
function with the arguments below.
cosmobleName
- string
: The name of the Cosmoble
table to connect to.
theConnection
- string
: A unique name for the connection.
function(key, value)
- a callback function
that will be called whenever a change is detected in your game data
Disconnecting from a Cosmoble
When you are finished using a Cosmoble, you should disconnect from it using the disconnectCosmoble
function with the arguments below, this will stop calling your connected function.
cosmobleName
- string
: The name of the Cosmoble table that you want to disconnect from.
connectionName
- string
: The unique name of the connection that you want to disconnect from.
Last updated