lia.net
Networking helper functions
Functions
checkBadType(name, object)
This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.
Checks if the provided object or any of its nested elements contain a bad type.
Parameters
-
name
String
The name of the networked variable
-
object
The object to be checked for bad types
Returns
-
any
True if a bad type is found, false otherwise
getNetVar(key, default)
Retrieves the value of a networked global variable.
Parameters
-
key
The key of the networked global variable
-
default
The default value to return if the variable is not found
Returns
-
any
The value of the networked global variable, or the default value if not found
getNetVar(key, default)
Retrieves the value of a networked global variable.
Parameters
-
key
The key of the networked global variable
-
default
The default value to return if the variable is not found
Returns
-
any
The value of the networked global variable, or the default value if not found
setNetVar(key, value, receiver)
Sets the value of a networked global variable.
Parameters
-
key
The key of the networked global variable
-
value
The value to set
-
receiver
Player
optional
The receiver of the network update