GameBaseData

consoledoc.h

Scriptable, demo-able datablock. Used by GameBase objects.

More...

Scripting

caseString

The group that this datablock will show up in under the "Scripted" tab in the World Editor Library.

Callbacks

void

Called when the object is added to the scene.

void

Called when the object has a new datablock assigned.

void

Called when the object is removed from the scene.

void
onMount(SceneObject obj, SceneObject mountObj, int node)

Called when the object is mounted to another object in the scene.

void
onUnmount(SceneObject obj, SceneObject mountObj, int node)

Called when the object is unmounted from another object in the scene.

Detailed Description

Scriptable, demo-able datablock. Used by GameBase objects.

Scripting

caseString category 

The group that this datablock will show up in under the "Scripted" tab in the World Editor Library.

Callbacks

onAdd(GameBase obj)

Called when the object is added to the scene.

Parameters:

obj

the GameBase object

datablock GameBaseData(MyObjectData)
{
   category = "Misc";
};

function MyObjectData::onAdd( %this, %obj )
{
   echo( "Added " @ %obj.getName() @ " to the scene." );
}

function MyObjectData::onNewDataBlock( %this, %obj )
{
   echo( "Assign " @ %this.getName() @ " datablock to " %obj.getName() );
}

function MyObjectData::onRemove( %this, %obj )
{
   echo( "Removed " @ %obj.getName() @ " to the scene." );
}

function MyObjectData::onMount( %this, %obj, %mountObj, %node )
{
   echo( %obj.getName() @ " mounted to " @ %mountObj.getName() );
}

function MyObjectData::onUnmount( %this, %obj, %mountObj, %node )
{
   echo( %obj.getName() @ " unmounted from " @ %mountObj.getName() );
}

onNewDataBlock(GameBase obj)

Called when the object has a new datablock assigned.

Parameters:

obj

the GameBase object

see:

onAdd for an example

onRemove(GameBase obj)

Called when the object is removed from the scene.

Parameters:

obj

the GameBase object

see:

onAdd for an example

onMount(SceneObject obj, SceneObject mountObj, int node)

Called when the object is mounted to another object in the scene.

Parameters:

obj

the GameBase object being mounted

mountObj

the object we are mounted to

node

the mountObj node we are mounted to

see:

onAdd for an example

onUnmount(SceneObject obj, SceneObject mountObj, int node)

Called when the object is unmounted from another object in the scene.

Parameters:

obj

the GameBase object being unmounted

mountObj

the object we are unmounted from

node

the mountObj node we are unmounted from

see:

onAdd for an example