A collection of network control functions. You must enable networking in the DX Studio document properties to use these functions. The groupId and documentId properties are also set in the document properties dialog. The instanceId property is created by the DX Studio Player every time the player is run.
Properties
groupId |
The group identifier (GUID string) for the current document. This is shared by every player in the same logical group of documents. |
documentId |
The document identifier (GUID string) for the current document. This is shared by every player running this document. |
instanceId |
The instance identifier (GUID string) for the current document. This is unique to this running copy of the player. |
connected |
Bool property that will return true if the network has a connection to the server. |
Methods
send(commandstring) |
Send a command to all network clients in the same group. |
getNetworkSet(idstring) |
Returns a NetworkSet object for the given identifier (GUID string). |
connect([server], [port]) |
Manually connects to a DX Studio network server with the optional string server address (e.g. demo.dxstudio.com) and optional integer port (default port is 9620). If no parameters are passed the settings from the document's Network page will be used. |
disconnect() |
Disconnects from any network server. |
Examples
network.send("system.exit();"); // all documents in the group will exit immediately
print("This player can be uniquely identified by this string: "+network.instanceId);
Remarks
GUID strings are just strings that are guaranteed to be globally unique. This helps to identify a document, group or individual player that you want to communicate with.
See Also


