System

A class that access some general variables of the Peer.

Method Summary
 nilcastRayAllTargets (string name, number posx, number posy, number posz, dirx Coordinate, diry Coordinate, dirz Coordinate)
 nilcastRayClosestTarget (string name, posx Coordinate, posy Coordinate, posz Coordinate, dirx Coordinate, diry Coordinate, dirz Coordinate)
 representation, number, number, numbercloseupCamera ()
 number, number, number, number, number, numbercloseupCamera ()
 nildisconnect ()
 nilexit ()
 logingetLogin ()
 ObjectgetObject (string objectID)
 array{Object}getObjects ()
 array{Object}getObjectsByName (string name)
 array{Object}getObjectsByTemplate (string class)
 PermissiongetPermissionLevel ()
 representationgetRepresentation (string representationID)
 number, numbergetResolution ()
 numbergetTime ()
 userKeygetUserKey ()
 booleanhasObject (string objectID)
 booleanhasRepresentation (string representationID)
 nilisLocalEvent ()
 nilprint (string obj)
 nilremoveObject (string objectID)
 nilremoveRepresentation (string representationID)
 nilrequestLoadPresence (string templateName)
 number, number, numbersetCameraPosition ()
 nilsetDefaultFont ()
 nilsetDefaultMouseCursor ()
 nilsetMouseCursorVisible (boolean visible)
 nilsetSoundVolume (number volume)
 nilsleep (number milliseconds)

Method Detail

castRayAllTargets

nil castRayAllTargets (string name, number posx, number posy, number posz, dirx Coordinate, diry Coordinate, dirz Coordinate)
Casts a ray which will trigger the corresponding listener in every target it hits

Parameters:
string name - Name of the ray
number posx - Coordinate X from where the ray is cast
number posy - Coordinate Y from where the ray is cast
number posz - Coordinate Z from where the ray is cast
dirx Coordinate - X of the direction to where the ray is cast
diry Coordinate - Y of the direction to where the ray is cast
dirz Coordinate - Z of the direction to where the ray is cast


castRayClosestTarget

nil castRayClosestTarget (string name, posx Coordinate, posy Coordinate, posz Coordinate, dirx Coordinate, diry Coordinate, dirz Coordinate)
Casts a ray that will trigger the listener only on the closest target

Parameters:
string name - Name of the ray
posx Coordinate - X from where the ray is cast
posy Coordinate - Y from where the ray is cast
posz Coordinate - Z from where the ray is cast
dirx Coordinate - X of the direction to where the ray is cast
diry Coordinate - Y of the direction to where the ray is cast
dirz Coordinate - Z of the direction to where the ray is cast


closeupCamera

representation, number, number, number closeupCamera ()
Closes the camera up to 'rep'.

Returns:
representation - Must be a representation of type light, model, plane, billboard or effect.
number - Distance of the camera to the representation.
number - Speed of the camera.
number - Time the camera stay on the representation.


closeupCamera

number, number, number, number, number, number closeupCamera ()
Closes the camera up to point (x,y,z).

Returns:
number - X coordinate of the point the camera is closing up.
number - Y coordinate of the point the camera is closing up.
number - Z coordinate of the point the camera is closing up.
number - Distance of the camera to the representation.
number - Speed of the camera.
number - Time the camera stay on the point.


disconnect

nil disconnect ()
Disconnects from the current arena or world.


exit

nil exit ()
Closes and exits the Peer.


getLogin

login getLogin ()
Returns the user login.

Returns:
login - User Login.


getObject

Object getObject (string objectID)
Returns the object with the specified object ID.

Parameters:
string objectID - Object ID.

Returns:
Object - Object with the specified object ID.


getObjects

array{Object} getObjects ()
Returns an array containing the objects in the arena.

Returns:
array{Object} - Array containing the objects in the arena.


getObjectsByName

array{Object} getObjectsByName (string name)
Returns an array containing the objects with the specified name.

Parameters:
string name - Name of the objects to return.

Returns:
array{Object} - Array containing the objects with the specified name.


getObjectsByTemplate

array{Object} getObjectsByTemplate (string class)
Returns an array containing the objects with the specified type.

Parameters:
string class - Class name of the objects to return.

Returns:
array{Object} - Array containing the objects with the specified type.


getPermissionLevel

Permission getPermissionLevel ()
Returns the user permission level.

Returns:
Permission - level.


getRepresentation

representation getRepresentation (string representationID)
Returns the representation with the specified representation ID.

Parameters:
string representationID - Representation ID.

Returns:
representation - Representation with the specified representation ID.


getResolution

number, number getResolution ()
The current screen resolution of the player.

Returns:
number - Width in number os pixels.
number - Height in number os pixels.


getTime

number getTime ()
Returns the current time.

Returns:
number - The current time.


getUserKey

userKey getUserKey ()
Returns the user UserKey.

Returns:
userKey - User Key.


hasObject

boolean hasObject (string objectID)
Return 'true' if the arena contains an object with the specified object ID, otherwise 'fase'.

Parameters:
string objectID - Object ID.

Returns:
boolean - 'True' if the arena contains an object with the specified object ID, otherwise 'fase'.


hasRepresentation

boolean hasRepresentation (string representationID)
Return 'true' if the arena contains an representation with the specified representation ID, otherwise 'fase'.

Parameters:
string representationID - Representation ID.

Returns:
boolean - 'True' if the arena contains an representation with the specified representation ID, otherwise 'fase'.


isLocalEvent

nil isLocalEvent ()
Event was generated by local GPi.


print

nil print (string obj)
Prints the object data in the console.

Parameters:
string obj - Print Object to be printed in the console.


removeObject

nil removeObject (string objectID)
Removes the object with the specified ID.

Parameters:
string objectID - ID of the object to remove.


removeRepresentation

nil removeRepresentation (string representationID)
Removes the representation with the specified ID.

Parameters:
string representationID - ID of the representation to remove.


requestLoadPresence

nil requestLoadPresence (string templateName)
Request Load Presence.

Parameters:
string templateName - Name of the presence template.


setCameraPosition

number, number, number setCameraPosition ()
Positions the camera in point (x,y,z).

Returns:
number - X coordinate of the camera's new point.
number - Y coordinate of the camera's new point.
number - Z coordinate of the camera's new point.


setDefaultFont

nil setDefaultFont ()
Sets the default font.


setDefaultMouseCursor

nil setDefaultMouseCursor ()
Sets the default mouse cursor.


setMouseCursorVisible

nil setMouseCursorVisible (boolean visible)
Sets the default mouse cursor.

Parameters:
boolean visible - Whether the cursor is visible or not.


setSoundVolume

nil setSoundVolume (number volume)
Changes the main sound volume.

Parameters:
number volume - Sound volume, between 0 and 1.


sleep

nil sleep (number milliseconds)
Sleeps the execution of the script for a given amount of time in milliseconds.

Parameters:
number milliseconds - Number of milliseconds to sleep.