Lua API  0.4.0
Game Engine
 All Files Functions
Objects.lua File Reference

Functions

 getObject (scene, name)
 Gets the object with the given name. More...
 
 getParent (object)
 Retrieves the parent of an object. More...
 
 getChilds (object)
 Returns a list of all childrens from the given object. More...
 
 getClone (object)
 Creates a clone of the given object. More...
 
 setParent (object, parent)
 Changes the parent of the given object. More...
 
 getName (object)
 Retrieves the name of the given object. More...
 
 activate (object)
 Activates the given object. More...
 
 deactivate (object)
 Deactivates the given object. More...
 
 isVisible (object)
 Checks if the given object is visible. More...
 
 isActive (object)
 Checks if the given object is active. More...
 
 enableShadow (object, shadow)
 Specifies, if a light renders shadows or if an entity has a shadow. More...
 
 isCastingShadow (object)
 Checks if a light renders shadows or if an entity has a shadow. More...
 

Function Documentation

activate ( object  )

Activates the given object.

Parameters
objectThe object.
deactivate ( object  )

Deactivates the given object.

This function does not delete the object from memory! It will just set invisible and removed from the physics simulation.

Parameters
objectThe object.
enableShadow ( object  ,
shadow   
)

Specifies, if a light renders shadows or if an entity has a shadow.

Parameters
objectThe entity/light.
shadowA boolean value.
getChilds ( object  )

Returns a list of all childrens from the given object.

Parameters
objectThe parent object.
Returns
The list of all children.
getClone ( object  )

Creates a clone of the given object.

Parameters
objectThe object to clone.
Returns
The clone.
getName ( object  )

Retrieves the name of the given object.

Parameters
objectThe object.
Returns
The name of the object.
getObject ( scene  ,
name   
)

Gets the object with the given name.

Can also give objects from other scenes than the current one.

Parameters
sceneThe scene to look in. This parameter is optional.
nameThe name of the object to retrieve.
getParent ( object  )

Retrieves the parent of an object.

Parameters
Theobject to retrieve the parent from. See also: getObject
Returns
The parent object.
isActive ( object  )

Checks if the given object is active.

Parameters
objectThe object.
Returns
A boolean value.
isCastingShadow ( object  )

Checks if a light renders shadows or if an entity has a shadow.

Parameters
objectThe entity/light.
Returns
A boolean value.
isVisible ( object  )

Checks if the given object is visible.

Parameters
objectThe object.
Returns
A boolean value.
setParent ( object  ,
parent   
)

Changes the parent of the given object.

Resets parent-child relationship if parent = nil.

Parameters
objectThe object.
parentThe new parent.