TorqueScript Reference
Public Member Functions | Static Public Member Functions | List of all members
GameConnection Class Reference

#include <gameConnection_ScriptBinding.h>

Inherits NetConnection.

Public Member Functions

void activateGhosting ()
 
void delete ([reason]?)
 
void resetGhosting ()
 
void setConnectArgs (name, [arg1,..., arg15]?)
 
void setJoinPassword (password)
 
- Public Member Functions inherited from NetConnection
void checkMaxRate ()
 
void connect (remoteAddress)
 
String connectLocal ()
 
String getAddress ()
 
Integer getGhostID (S32 realID)
 
S32 getGhostsActive ()
 
Integer getPacketLoss ()
 
Integer getPing ()
 
Integer resolveGhostID (S32 ghostID)
 
Integer resolveObjectFromGhostIndex (S32 ghostIdx)
 
void setSimulatedNetParams (packetLoss, delay)
 

Static Public Member Functions

static Integer getServerConnection ()
 

Member Function Documentation

◆ activateGhosting()

void activateGhosting ( )

Use the activateGhosting method to GameConnection instance to start ghosting objects to the client. This is called on each client connection by the server.

Returns
No return value.
See also
resetGhosting

◆ delete()

void delete ( [ reason ] ?  )

Use the delete method to destroy and disconnect the current connection, giving an optional reason. If reason is specified, it will be transmitted to the client/server on the other end of the connection.

Parameters
reasonA string explaining while the connection is being severed.
Returns
No return value

◆ getServerConnection()

static Integer getServerConnection ( )
static

Get the server connection if any.

◆ resetGhosting()

void resetGhosting ( )

Use the resetGhosting method to reset ghosting. This in effect tells the server to resend each ghost to insure that all objects which should be ghosts and are in fact ghosted.

Returns
No return value.
See also
activateGhosting

◆ setConnectArgs()

void setConnectArgs ( name  ,
[arg1, ..., arg15 ] ?   
)

Use the setConnectArgs method to set the connection arguments for this client-side GameConnection. These values will be passed to the server upon establishing a connection.

Parameters
nameGenerally, the first argument is the name of the player.
arg1... , arg15 - 15 additional arguments may be passed.
Returns
No return value.
See also
setJoinPassword

◆ setJoinPassword()

void setJoinPassword ( password  )

Use the setJoinPassword method to set the password required to connect to this server-side GameConnection. Pass a NULL string to clear the password.

Parameters
passwordA string representing the case insensitive password to use for this server-side GameConnection.
Returns
No return value.
See also
setConnectArgs