User Tools

Site Tools


lgscript:networkingsrv

NetworkingSrv

Broadcast

Send a message to an object on other hosts.

Returns boolean success
Parameter integer destination
Parameter string message
Parameter boolean loopback (optional)
Parameter any data (optional)

SendToProxy

Send a message using a proxy.

Returns boolean success
Parameter integer source
Parameter integer destination
Parameter string message
Parameter any data (optional)

TakeOver

Become the host for an object.

Returns boolean success
Parameter integer object

GiveTo

Change the host for an object.

Returns boolean success
Parameter integer object
Parameter integer host

IsPlayer

Check if the object is one of the players.

Returns boolean isplayer
Parameter integer object

IsMultiplayer

Check if the game is in multiplayer mode.

Returns boolean ismultiplayer

SetProxyOneShotTimer

Send a timed message using a proxy.

Returns integer timerid
Parameter integer destination
Parameter string message
Parameter number seconds
Parameter any data (optional)

FirstPlayer

Begin iterating player objects.

Returns integer or nil object

NextPlayer

Get another player object. Returns nil when there are no more players.

Returns integer or nil object

Suspend

Disable network communication.

Resume

Restart the network.

HostedHere

Check if this node is the host of an object.

Returns boolean ishost
Parameter integer object

IsProxy

Check if an object is hosted by another node.

Returns boolean isproxy
Parameter integer object

LocalOnly

Check if an object only exists at this node.

Returns boolean islocal
Parameter integer object

IsNetworking

Check if the network is active.

Returns boolean isnetwork

Owner

Get the host of an object.

Returns integer or nil host
Parameter integer object
lgscript/networkingsrv.txt · Last modified: 2009/08/25 22:04 (external edit)