PresenceTemplate

Presence templates are presences created in the world and will act as templates when creating presences in the arenas.
This class only allows you to access the template data.

Method Summary
 array{}getAbilities ()
 stringgetAbility (string name)
 stringgetAttribute (string name)
 hastable{string,string}getAttributes ()
 BillBoardgetBillboard (string name)
 array{BillBoard}getBillboards ()
 stringgetDescription ()
 EffectgetEffect (string name)
 array{Effect}getEffects ()
 stringgetID ()
 LightgetLight (string name)
 array{Light}getLights ()
 ModelgetModel (string name)
 array{Model}getModels ()
 stringgetName ()
 OverlaygetOverlay (string name)
 array{}getOverlays ()
 PlanegetPlane (string name)
 array{Plane}getPlanes ()
 representationgetRepresentation (string name, number type)
 array{}getRepresentations ()
 SoundgetSound (string name)
 array{Sound}getSounds ()
 numbergetType ()
 booleanhasAbility (string name)
 booleanhasAttribute (string name)
 booleanhasModel (string name)
 booleanisPersistent ()
 booleanisVisible ()
 nilprint ()

Method Detail

getAbilities

array{} getAbilities ()
Returns the abilities available in this presence.

Returns:
array{} - Abilities available in this presence.


getAbility

string getAbility (string name)
Returns the value of the ability with name 'name'.

Parameters:
string name - Name of the ability to be returned.

Returns:
string - Value of the ability.


getAttribute

string getAttribute (string name)
Returns the value of the attribute of the specified name.

Parameters:
string name - Name of the attribute.

Returns:
string - Value of the attribute.


getAttributes

hastable{string,string} getAttributes ()
Returns an hashtable containg pairs of attribute name and attribute value.

Returns:
hastable{string,string} - Hashtable containg pairs of attribute name and attribute value.


getBillboard

BillBoard getBillboard (string name)
Returns the billboard with name 'name'.

Parameters:
string name - Name of the billboard you are seaching for.

Returns:
BillBoard - Billboard you are searching for.


getBillboards

array{BillBoard} getBillboards ()
Returns all billboards available in the PresenceTemplate.

Returns:
array{BillBoard} - Billboards available in the PresenceTemplate.


getDescription

string getDescription ()
Returns the description of the PresenceTemplate.

Returns:
string - Description if the PresenceTemplate.


getEffect

Effect getEffect (string name)
Returns the material with name 'name'.

Parameters:
string name - Name of the effect you are searching for.

Returns:
Effect - The effect you are searching for.


getEffects

array{Effect} getEffects ()
Returns the effects available in the PresenceTemplate.

Returns:
array{Effect} - Effects available in the PresenceTemplate.


getID

string getID ()
Returns the object ID.

Returns:
string - Object ID.


getLight

Light getLight (string name)
Returns a light in the PresenceTemplate with the specified name.

Parameters:
string name - Name that identifies the light.

Returns:
Light - Light with the specified name.


getLights

array{Light} getLights ()
Returns an array containig the lights of the PresenceTemplate.

Returns:
array{Light} - Array containig the lights of the object.


getModel

Model getModel (string name)
Returns the model with name 'name'

Parameters:
string name - Name of the model you want to get.

Returns:
Model - The model you are searching for.


getModels

array{Model} getModels ()
Returns an array of models available in the PresenceTemplate.

Returns:
array{Model} - Models of the PresenceTemplate


getName

string getName ()
Returns the name of the PresenceTemplate.

Returns:
string - Name of the PresenceTemplate.


getOverlay

Overlay getOverlay (string name)
Returns an Overlay identified by name contained in this PresenceTemplate.

Parameters:
string name - Name of the Overlay.

Returns:
Overlay - The child Overlay identified by name.


getOverlays

array{} getOverlays ()
Returns the Overlays contained in this PresenceTemplate.

Returns:
array{} - Overlays contained in this PresenceTemplate.


getPlane

Plane getPlane (string name)
Returns the plane with name 'name'

Parameters:
string name - Name of the plane you want to get.

Returns:
Plane - The plane you are searching for.


getPlanes

array{Plane} getPlanes ()
Returns all planes of the PresenceTemplate.

Returns:
array{Plane} - Planes of the PresenceTemplate.


getRepresentation

representation getRepresentation (string name, number type)
Returns the representation with the specified name and type.

Parameters:
string name - Name of the representation.
number type - Type of the representation.

Returns:
representation - The representation with the specified name and type.


getRepresentations

array{} getRepresentations ()
Returns an array containing all representations in the arena.

Returns:
array{} - Array containing all representations in the arena.


getSound

Sound getSound (string name)
Returns the sound with name 'name'

Parameters:
string name - Name of the sound you want to get.

Returns:
Sound - Sound you want to search for.


getSounds

array{Sound} getSounds ()
Returns the sounds available in the PresenceTemplate.

Returns:
array{Sound} - Sounds of the PresenceTemplate .


getType

number getType ()
Returns the type of the object.

Returns:
number - The object type: OT_OBJECT, OT_PRESENCE, ARENA, RULEBOOK, OBJECT_TEMPLATE or PRESENCE_TEMPLATE.


hasAbility

boolean hasAbility (string name)
Returns whether there is an ability in the presence with name 'name' or not.

Parameters:
string name - Name of the ability to be checked.

Returns:
boolean - 'True' if the PresenceTemplate has an ability with name 'name', otherwise 'false'.


hasAttribute

boolean hasAttribute (string name)
'true' if the PresenceTemplate has an attribute with the specified name, otherwise 'false'.

Parameters:
string name - Name of the attribute

Returns:
boolean - 'True' if the PresenceTemplate has an attribute with the specified name, otherwise 'false'.


hasModel

boolean hasModel (string name)
Checks if the PresenceTemplate has a model with name 'name'

Parameters:
string name - Name of the model you want to check.

Returns:
boolean - 'True' if the model is found, 'false' otherwise.


isPersistent

boolean isPersistent ()
Returns 'true' if the object is set as persistent, otherwise 'false'.

Returns:
boolean - 'True' if the object is set as persistent, otherwise 'false'.


isVisible

boolean isVisible ()
Return 'true' if the object is set as visible, otherwise 'false'.

Returns:
boolean - 'True' if the object is set as visible, otherwise 'false'.


print

nil print ()
Prints the presence template information to the console.