Documentation on method called by torque engine
by Philippe C · in Torque Game Engine · 02/14/2006 (10:08 am) · 8 replies
I am not able to found documentation relative to the method called automatically by Torque engine
for instance :
datablock PlaterData(MyAvatar)
{
...
}
...
function MyAvatar::onCollosion(%this,%obj,%vec,%speed)
{
...
}
the method xxx::onCollosion is called by the torque engine when a collision occurs.
There is a lot of methods like that for "datablock".
Do you know where I can find documentation which lists all these functions called by torque engine with some explanations ?
for instance :
datablock PlaterData(MyAvatar)
{
...
}
...
function MyAvatar::onCollosion(%this,%obj,%vec,%speed)
{
...
}
the method xxx::onCollosion is called by the torque engine when a collision occurs.
There is a lot of methods like that for "datablock".
Do you know where I can find documentation which lists all these functions called by torque engine with some explanations ?
#2
an example of functions called by torque engine directly and not by scripts :
xxxx::onCollisions (...)
xxxx::onPickup(...)
xxxx::onInventory(...)
....
these kind of functions are the fundation of the game play in Torque.
02/14/2006 (10:45 am)
I know this page . no information on the list of methods call by torque engine.an example of functions called by torque engine directly and not by scripts :
xxxx::onCollisions (...)
xxxx::onPickup(...)
xxxx::onInventory(...)
....
these kind of functions are the fundation of the game play in Torque.
#3
Right now there's no official list because they're not easily indexable - all the engine knows it is doing is calling a function with such and such a name at some points in time.
If you read the C++ code, the documentation out there, and the significant amount of example code we ship with the engine, you'll quickly get an understanding of what callbacks there are and how they can be used.
02/14/2006 (11:24 am)
They're described in many tutorials, guides, etc. and can be easily found by searching for Con::execute in the C++ engine code.Right now there's no official list because they're not easily indexable - all the engine knows it is doing is calling a function with such and such a name at some points in time.
If you read the C++ code, the documentation out there, and the significant amount of example code we ship with the engine, you'll quickly get an understanding of what callbacks there are and how they can be used.
#4
Now my issue is : how to know the function arguments ?
The list below is complete ?
engine/console/console.cc: warnf(ConsoleLogEntry::Script, "Con::execute - %d has no namespace: %s", object->getId(), argv[0]);
engine/console/consoleFunctions.cc: return Con::execute(argc - 1, argv + 1);
engine/console/console.h:/// using Con::executef() and kin.
engine/console/scriptObject.cc: Con::executef(this, 2, "onAdd", Con::getIntArg(getId()));
engine/console/scriptObject.cc: Con::executef(this, 2, "onRemove", Con::getIntArg(getId()));
engine/console/scriptObject.cc: Con::executef(this, 2, "onAdd", Con::getIntArg(getId()));
engine/console/scriptObject.cc: Con::executef(this, 2, "onRemove", Con::getIntArg(getId()));
engine/console/simBase.cc:// Con::executef(1, "backtrace");
engine/console/simBase.cc:// Con::executef(1, "backtrace");
engine/console/simBase.cc: Con::execute(object, mArgc, const_cast( mArgv ));
engine/console/simBase.cc: Con::execute(mArgc, const_cast( mArgv ));
engine/console/simBase.h: /// The parameters here are passed unmodified to Con::execute() at the
engine/console/simBase.h: /// @see Con::execute(S32 argc, const char *argv[])
engine/console/simBase.h: /// @see Con::execute(SimObject *object, S32 argc, const char *argv[])
engine/editor/editTSCtrl.cc: Con::executef(*itr, 4, "onEditorRender", getIdString(), buf[0], buf[1]);
engine/editor/missionAreaEditor.cc: Con::executef(this, 2, "onUpdate", buf);
engine/editor/missionAreaEditor.cc: Con::executef(object, 2, "onWorldOffset", buf);
engine/editor/terrainEditor.cc: Con::executef(this, 2, "onGuiUpdate", buf);
engine/editor/worldEditor.cc: Con::executef(obj ? obj : this, 2, "onDblClick", buf);
engine/editor/worldEditor.cc: Con::executef(obj ? obj : this, 2, "onClick", buf);
engine/editor/worldEditor.cc: Con::executef(obj ? obj : this, 2, "onClick", buf);
engine/editor/worldEditor.cc: Con::executef(obj ? obj : this, 2, "onGuiUpdate", buf);
engine/game/aiClient.cc: Con::executef( this, 2, name );
engine/game/aiClient.cc: Con::executef( aiPlayer, 2, "onConnect", name );
engine/game/aiConnection.cc: Con::execute(aiConnection, argc + 1, args);
engine/game/aiPlayer.cc: Con::executef(getDataBlock(), 2, name, scriptThis());
engine/game/debugView.cc: const char *textStr = Con::executef(2, "aiGetTaskDesc", avar("%d", client->getId()));
engine/game/gameBase.cc: Con::executef(mDataBlock,2,"onAdd",scriptThis());
engine/game/gameBase.cc: Con::executef(mDataBlock,2,"onNewDataBlock",scriptThis());
engine/game/gameBase.cc: Con::executef(mDataBlock,2,"onRemove",scriptThis());
engine/game/gameConnection.cc: Con::executef(this, 1, "onConnectionTimedOut");
engine/game/gameConnection.cc: Con::executef(this, 1, "onConnectionAccepted");
engine/game/gameConnection.cc: Con::execute(this, mConnectArgc + 2, argv);
engine/game/gameConnection.cc: Con::executef(this, 1, "onConnectRequestTimedOut");
engine/game/gameConnection.cc: Con::executef(this, 2, "onConnectionDropped", reason);
engine/game/gameConnection.cc: Con::executef(this, 2, "onConnectRequestRejected", reason);
engine/game/gameConnection.cc: Con::executef(this, 2, "onConnectRequestRejected", errorString);
engine/game/gameConnection.cc: const char *ret = Con::execute(this, mConnectArgc + 3, connectArgv);
engine/game/gameConnection.cc: Con::executef(this, 2, "onConnectionError", errorString);
engine/game/gameConnection.cc: Con::executef(this, 2, "onDrop", mDisconnectReason);
engine/game/gameConnection.cc: Con::executef(this, 2, "initialControlSet");
engine/game/gameConnection.cc: Con::executef(this, 2, "setLagIcon", "true");
engine/game/gameConnection.cc: Con::executef(this, 2, "setLagIcon", "false");
engine/game/gameConnection.cc: Con::executef(this, 2, "onDataBlocksDone", Con::getIntArg(getDataBlockSequence()));
engine/game/gameConnectionEvents.cc: Con::executef(3, "onDataBlockObjectReceived", Con::getIntArg(mIndex), Con::getIntArg(mTotal));
engine/game/guiPlayerView.cc: Con::executef(this, 1, "onMouseEnter");
engine/game/guiPlayerView.cc: Con::executef(this, 1, "onMouseLeave");
engine/game/item.cc: Con::executef(mDataBlock, 2, "onStickyCollision", scriptThis());
engine/game/item.cc: Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg(mWaterCoverage), Con::getIntArg(mLiquidType));
engine/game/item.cc: Con::executef(mDataBlock,3,"onLeaveLiquid",scriptThis(), Con::getIntArg(mLiquidType));
engine/game/main.cc: Con::executef(2, "eval", script);
engine/game/main.cc: Con::executef(1, "onExit");
engine/game/pathCamera.cc: Con::executef(mDataBlock,3,"onNode",scriptThis(), Con::getIntArg(node));
engine/game/player.cc: Con::executef(mDataBlock,2,"doDismount",scriptThis());
engine/game/player.cc: Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg(mWaterCoverage), Con::getIntArg(mLiquidType));
engine/game/player.cc: Con::executef(mDataBlock,3,"onLeaveLiquid",scriptThis(), Con::getIntArg(mLiquidType));
engine/game/player.cc: Con::executef(mDataBlock,3,"animationDone",scriptThis());
engine/game/player.cc: Con::executef(mDataBlock,3,"onLeaveMissionArea",scriptThis());
engine/game/player.cc: Con::executef(mDataBlock,3,"onEnterMissionArea",scriptThis());
engine/game/projectile.cc: Con::executef(mDataBlock, 4, "onExplode", scriptThis(), buffer, Con::getFloatArg(mFadeValue));
engine/game/projectile.cc: Con::executef(mDataBlock, 6, "onCollision",
engine/game/shapeBase.cc: Con::executef(mDataBlock,5,"onImpact",scriptThis(), obj->getIdString(), buff1, buff2);
engine/game/shapeBase.cc: Con::executef(mDataBlock,5,"onImpact",scriptThis(), "0", buff1, buff2);
engine/game/shapeBase.cc: Con::executef(mDataBlock,3,"onDamage",scriptThis(),delta);
engine/game/shapeBase.cc: Con::executef(mDataBlock,4,"onTrigger",scriptThis(),buf1,buf2);
engine/game/shapeBase.cc: Con::executef(mDataBlock,3,"onDamage",scriptThis(),delta);
engine/game/shapeBase.cc: Con::executef(mDataBlock,3,script,scriptThis(),lastState);
engine/game/shapeBase.cc: Con::executef(mDataBlock,4,"onMount",scriptThis(),obj->scriptThis(),buff1);
engine/game/shapeBase.cc: Con::executef(mDataBlock,4,"onUnmount",scriptThis(),obj->scriptThis(),buff1);
engine/game/shapeBase.cc: Con::executef(mDataBlock,3,"onEndSequence",scriptThis(),slot);
engine/game/shapeBase.cc: Con::executef(mDataBlock,5,"onCollision",scriptThis(),object->scriptThis(), buff1, buff2);
engine/game/shapeBase.cc: Con::executef(mDataBlock, 3, "onForceUncloak", scriptThis(), reason ? reason : "");
02/14/2006 (11:58 am)
Thanks for the information ( C++ code ). Now my issue is : how to know the function arguments ?
The list below is complete ?
engine/console/console.cc: warnf(ConsoleLogEntry::Script, "Con::execute - %d has no namespace: %s", object->getId(), argv[0]);
engine/console/consoleFunctions.cc: return Con::execute(argc - 1, argv + 1);
engine/console/console.h:/// using Con::executef() and kin.
engine/console/scriptObject.cc: Con::executef(this, 2, "onAdd", Con::getIntArg(getId()));
engine/console/scriptObject.cc: Con::executef(this, 2, "onRemove", Con::getIntArg(getId()));
engine/console/scriptObject.cc: Con::executef(this, 2, "onAdd", Con::getIntArg(getId()));
engine/console/scriptObject.cc: Con::executef(this, 2, "onRemove", Con::getIntArg(getId()));
engine/console/simBase.cc:// Con::executef(1, "backtrace");
engine/console/simBase.cc:// Con::executef(1, "backtrace");
engine/console/simBase.cc: Con::execute(object, mArgc, const_cast
engine/console/simBase.cc: Con::execute(mArgc, const_cast
engine/console/simBase.h: /// The parameters here are passed unmodified to Con::execute() at the
engine/console/simBase.h: /// @see Con::execute(S32 argc, const char *argv[])
engine/console/simBase.h: /// @see Con::execute(SimObject *object, S32 argc, const char *argv[])
engine/editor/editTSCtrl.cc: Con::executef(*itr, 4, "onEditorRender", getIdString(), buf[0], buf[1]);
engine/editor/missionAreaEditor.cc: Con::executef(this, 2, "onUpdate", buf);
engine/editor/missionAreaEditor.cc: Con::executef(object, 2, "onWorldOffset", buf);
engine/editor/terrainEditor.cc: Con::executef(this, 2, "onGuiUpdate", buf);
engine/editor/worldEditor.cc: Con::executef(obj ? obj : this, 2, "onDblClick", buf);
engine/editor/worldEditor.cc: Con::executef(obj ? obj : this, 2, "onClick", buf);
engine/editor/worldEditor.cc: Con::executef(obj ? obj : this, 2, "onClick", buf);
engine/editor/worldEditor.cc: Con::executef(obj ? obj : this, 2, "onGuiUpdate", buf);
engine/game/aiClient.cc: Con::executef( this, 2, name );
engine/game/aiClient.cc: Con::executef( aiPlayer, 2, "onConnect", name );
engine/game/aiConnection.cc: Con::execute(aiConnection, argc + 1, args);
engine/game/aiPlayer.cc: Con::executef(getDataBlock(), 2, name, scriptThis());
engine/game/debugView.cc: const char *textStr = Con::executef(2, "aiGetTaskDesc", avar("%d", client->getId()));
engine/game/gameBase.cc: Con::executef(mDataBlock,2,"onAdd",scriptThis());
engine/game/gameBase.cc: Con::executef(mDataBlock,2,"onNewDataBlock",scriptThis());
engine/game/gameBase.cc: Con::executef(mDataBlock,2,"onRemove",scriptThis());
engine/game/gameConnection.cc: Con::executef(this, 1, "onConnectionTimedOut");
engine/game/gameConnection.cc: Con::executef(this, 1, "onConnectionAccepted");
engine/game/gameConnection.cc: Con::execute(this, mConnectArgc + 2, argv);
engine/game/gameConnection.cc: Con::executef(this, 1, "onConnectRequestTimedOut");
engine/game/gameConnection.cc: Con::executef(this, 2, "onConnectionDropped", reason);
engine/game/gameConnection.cc: Con::executef(this, 2, "onConnectRequestRejected", reason);
engine/game/gameConnection.cc: Con::executef(this, 2, "onConnectRequestRejected", errorString);
engine/game/gameConnection.cc: const char *ret = Con::execute(this, mConnectArgc + 3, connectArgv);
engine/game/gameConnection.cc: Con::executef(this, 2, "onConnectionError", errorString);
engine/game/gameConnection.cc: Con::executef(this, 2, "onDrop", mDisconnectReason);
engine/game/gameConnection.cc: Con::executef(this, 2, "initialControlSet");
engine/game/gameConnection.cc: Con::executef(this, 2, "setLagIcon", "true");
engine/game/gameConnection.cc: Con::executef(this, 2, "setLagIcon", "false");
engine/game/gameConnection.cc: Con::executef(this, 2, "onDataBlocksDone", Con::getIntArg(getDataBlockSequence()));
engine/game/gameConnectionEvents.cc: Con::executef(3, "onDataBlockObjectReceived", Con::getIntArg(mIndex), Con::getIntArg(mTotal));
engine/game/guiPlayerView.cc: Con::executef(this, 1, "onMouseEnter");
engine/game/guiPlayerView.cc: Con::executef(this, 1, "onMouseLeave");
engine/game/item.cc: Con::executef(mDataBlock, 2, "onStickyCollision", scriptThis());
engine/game/item.cc: Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg(mWaterCoverage), Con::getIntArg(mLiquidType));
engine/game/item.cc: Con::executef(mDataBlock,3,"onLeaveLiquid",scriptThis(), Con::getIntArg(mLiquidType));
engine/game/main.cc: Con::executef(2, "eval", script);
engine/game/main.cc: Con::executef(1, "onExit");
engine/game/pathCamera.cc: Con::executef(mDataBlock,3,"onNode",scriptThis(), Con::getIntArg(node));
engine/game/player.cc: Con::executef(mDataBlock,2,"doDismount",scriptThis());
engine/game/player.cc: Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg(mWaterCoverage), Con::getIntArg(mLiquidType));
engine/game/player.cc: Con::executef(mDataBlock,3,"onLeaveLiquid",scriptThis(), Con::getIntArg(mLiquidType));
engine/game/player.cc: Con::executef(mDataBlock,3,"animationDone",scriptThis());
engine/game/player.cc: Con::executef(mDataBlock,3,"onLeaveMissionArea",scriptThis());
engine/game/player.cc: Con::executef(mDataBlock,3,"onEnterMissionArea",scriptThis());
engine/game/projectile.cc: Con::executef(mDataBlock, 4, "onExplode", scriptThis(), buffer, Con::getFloatArg(mFadeValue));
engine/game/projectile.cc: Con::executef(mDataBlock, 6, "onCollision",
engine/game/shapeBase.cc: Con::executef(mDataBlock,5,"onImpact",scriptThis(), obj->getIdString(), buff1, buff2);
engine/game/shapeBase.cc: Con::executef(mDataBlock,5,"onImpact",scriptThis(), "0", buff1, buff2);
engine/game/shapeBase.cc: Con::executef(mDataBlock,3,"onDamage",scriptThis(),delta);
engine/game/shapeBase.cc: Con::executef(mDataBlock,4,"onTrigger",scriptThis(),buf1,buf2);
engine/game/shapeBase.cc: Con::executef(mDataBlock,3,"onDamage",scriptThis(),delta);
engine/game/shapeBase.cc: Con::executef(mDataBlock,3,script,scriptThis(),lastState);
engine/game/shapeBase.cc: Con::executef(mDataBlock,4,"onMount",scriptThis(),obj->scriptThis(),buff1);
engine/game/shapeBase.cc: Con::executef(mDataBlock,4,"onUnmount",scriptThis(),obj->scriptThis(),buff1);
engine/game/shapeBase.cc: Con::executef(mDataBlock,3,"onEndSequence",scriptThis(),slot);
engine/game/shapeBase.cc: Con::executef(mDataBlock,5,"onCollision",scriptThis(),object->scriptThis(), buff1, buff2);
engine/game/shapeBase.cc: Con::executef(mDataBlock, 3, "onForceUncloak", scriptThis(), reason ? reason : "");
#5
engine/game/showTSShape.cc: Con::executef(2,"exec",fileBuffer);
engine/game/trigger.cc: Con::executef(*itr, 3, "onTrigger", Con::getIntArg(trigger->getId()), "1");
engine/game/trigger.cc: Con::executef(*itr, 3, "onTrigger", Con::getIntArg(trigger->getId()), "0");
engine/game/trigger.cc: Con::executef(*itr, 2, "onTriggerTick", Con::getIntArg(trigger->getId()));
engine/game/trigger.cc: Con::executef(mDataBlock, 3, "onLeaveTrigger", scriptThis(), Con::getIntArg(pScene->getId()));
engine/game/trigger.cc: Con::executef(mDataBlock, 3, "onEnterTrigger", scriptThis(), Con::getIntArg(enter->getId()));
engine/game/trigger.cc: Con::executef(mDataBlock, 3, "onLeaveTrigger", scriptThis(), remove->scriptThis());
engine/game/trigger.cc: Con::executef(mDataBlock, 2, "onTickTrigger", scriptThis());
engine/gui/guiArrayCtrl.cc: Con::executef(this, 3, "onSelect", Con::getFloatArg(cell.x), Con::getFloatArg(cell.y));
engine/gui/guiArrayCtrl.cc: Con::executef(this, 4, "onRightMouseDown", Con::getIntArg(cell.x), Con::getIntArg(cell.y), buf);
engine/gui/guiAviBitmapCtrl.cc: // Con::executef(this,1,"movieStopped");
engine/gui/guiAviBitmapCtrl.cc: // Con::executef(this,1,"movieStopped");
engine/gui/guiCanvas.cc: // Con::executef(gui, 1, "onWake");
engine/gui/guiControl.cc: Con::executef(this, 1, "onAdd");
engine/gui/guiControl.cc: Con::executef(this, 1, "onWake");
engine/gui/guiControl.cc: Con::executef(this, 1, "onSleep");
engine/gui/guiControl.cc: Con::executef(this, 1, "onRemove");
engine/gui/guiControl.cc: Con::executef(this, 1, "onAction");
engine/gui/guiDebugger.cc: Con::executef(2, "DbgSetCursorWatch", mMouseOverVariable);
engine/gui/guiDebugger.cc: Con::executef(2, "DbgSetCursorWatch", "");
engine/gui/guiDebugger.cc: Con::executef(this, 2, "onRemoveBreakPoint", itoa(cell.y + 1));
engine/gui/guiDebugger.cc: Con::executef(this, 2, "onSetBreakPoint", itoa(cell.y + 1));
engine/gui/guiDebugger.cc: Con::executef(this, 2, "onSetWatch", mMouseOverVariable);
engine/gui/guiEditCtrl.cc: Con::executef(this, 2, "onSelect", avar("%d", mSelectedControls[0]->getId()));
engine/gui/guiEditCtrl.cc: Con::executef(this, 2, "onSelect", avar("%d", mSelectedControls[0]->getId()));
engine/gui/guiEditCtrl.cc: Con::executef(this, 2, "onSelect", avar("%d", mSelectedControls[0]->getId()));
engine/gui/guiEditCtrl.cc: Con::executef(2, "exec", filename);
engine/gui/guiFadeinBitmapCtrl.cc: Con::executef(this, 1, "click");
engine/gui/guiFadeinBitmapCtrl.cc: Con::executef(this, 1, "click");
engine/gui/guiInputCtrl.cc: Con::executef( this, 4, "onInputEvent", deviceString, actionString, "1" );
engine/gui/guiInputCtrl.cc: Con::executef( this, 4, "onInputEvent", "keyboard", keyString, "0" );
engine/gui/guiMenuBar.cc: Con::executef( this, 4, "onMenuSelect", Con::getIntArg(menu->id),
engine/gui/guiMenuBar.cc: Con::executef( this, 6, "onMenuItemSelect", Con::getIntArg(menu->id),
engine/gui/guiMenuBar.cc: Con::executef( this, 4, "onMenuSelect", Con::getIntArg(mouseDownMenu->id),
engine/gui/guiMessageVectorCtrl.cc: Con::executef(this, 2, "urlClickCallback", copyURL);
engine/gui/guiMLTextCtrl.cc: //Con::executef( this, 3, "onResize", Con::getIntArg( newExtent.x ), Con::getIntArg( newExtent.y ) );
engine/gui/guiMLTextCtrl.cc: Con::executef(this, 2, "onURL", url);
engine/gui/guiMLTextCtrl.cc: Con::executef( this, 3, "onResize", Con::getIntArg( mBounds.extent.x ), Con::getIntArg( mMaxY ) );
engine/gui/guiMouseEventCtrl.cc: Con::executef(this, 4, name, buf[0], buf[1], buf[2]);
engine/gui/guiPopUpCtrl.cc: Con::executef( this, 3, "onSelect", idval, mEntries[mSelIndex].buf );
engine/gui/guiPopUpCtrl.cc: Con::executef( this, 1, "onCancel" );
engine/gui/guiPopUpCtrl.cc: Con::executef( this, 3, "onSelect", idval, mEntries[mSelIndex].buf );
engine/gui/guiPopUpCtrl.cc: Con::executef( this, 1, "onCancel" );
engine/gui/guiTextEditCtrl.cc: Con::executef( this, 2, "onTabComplete", "1" );
engine/gui/guiTextEditCtrl.cc: Con::executef( this, 2, "onTabComplete", "0" );
engine/gui/guiTextListCtrl.cc: Con::executef(this, 3, "onSelect", Con::getIntArg(mList[cell.y].id), mList[cell.y].text);
engine/gui/guiTextListCtrl.cc: Con::executef( this, 2, "onDeleteKey", Con::getIntArg( mList[mSelectedCell.y].id ) );
engine/gui/guiTreeViewCtrl.cc: Con::executef(this, 3, "onContextMenu", buf1, buf2);
engine/gui/guiTreeViewCtrl.cc: Con::executef(this, 2, "onInspect", buf);
engine/gui/guiTreeViewCtrl.cc: Con::executef(this, 3, "onSelect", Con::getIntArg(obj->getId()), Con::getIntArg(rightMouse));
engine/gui/guiTreeViewCtrl.cc: Con::executef(this, 2, "onUnselect", buf);
02/14/2006 (11:59 am)
Engine/game/shapeImage.cc: Con::executef(image.dataBlock, 3, function,scriptThis(),buff1);engine/game/showTSShape.cc: Con::executef(2,"exec",fileBuffer);
engine/game/trigger.cc: Con::executef(*itr, 3, "onTrigger", Con::getIntArg(trigger->getId()), "1");
engine/game/trigger.cc: Con::executef(*itr, 3, "onTrigger", Con::getIntArg(trigger->getId()), "0");
engine/game/trigger.cc: Con::executef(*itr, 2, "onTriggerTick", Con::getIntArg(trigger->getId()));
engine/game/trigger.cc: Con::executef(mDataBlock, 3, "onLeaveTrigger", scriptThis(), Con::getIntArg(pScene->getId()));
engine/game/trigger.cc: Con::executef(mDataBlock, 3, "onEnterTrigger", scriptThis(), Con::getIntArg(enter->getId()));
engine/game/trigger.cc: Con::executef(mDataBlock, 3, "onLeaveTrigger", scriptThis(), remove->scriptThis());
engine/game/trigger.cc: Con::executef(mDataBlock, 2, "onTickTrigger", scriptThis());
engine/gui/guiArrayCtrl.cc: Con::executef(this, 3, "onSelect", Con::getFloatArg(cell.x), Con::getFloatArg(cell.y));
engine/gui/guiArrayCtrl.cc: Con::executef(this, 4, "onRightMouseDown", Con::getIntArg(cell.x), Con::getIntArg(cell.y), buf);
engine/gui/guiAviBitmapCtrl.cc: // Con::executef(this,1,"movieStopped");
engine/gui/guiAviBitmapCtrl.cc: // Con::executef(this,1,"movieStopped");
engine/gui/guiCanvas.cc: // Con::executef(gui, 1, "onWake");
engine/gui/guiControl.cc: Con::executef(this, 1, "onAdd");
engine/gui/guiControl.cc: Con::executef(this, 1, "onWake");
engine/gui/guiControl.cc: Con::executef(this, 1, "onSleep");
engine/gui/guiControl.cc: Con::executef(this, 1, "onRemove");
engine/gui/guiControl.cc: Con::executef(this, 1, "onAction");
engine/gui/guiDebugger.cc: Con::executef(2, "DbgSetCursorWatch", mMouseOverVariable);
engine/gui/guiDebugger.cc: Con::executef(2, "DbgSetCursorWatch", "");
engine/gui/guiDebugger.cc: Con::executef(this, 2, "onRemoveBreakPoint", itoa(cell.y + 1));
engine/gui/guiDebugger.cc: Con::executef(this, 2, "onSetBreakPoint", itoa(cell.y + 1));
engine/gui/guiDebugger.cc: Con::executef(this, 2, "onSetWatch", mMouseOverVariable);
engine/gui/guiEditCtrl.cc: Con::executef(this, 2, "onSelect", avar("%d", mSelectedControls[0]->getId()));
engine/gui/guiEditCtrl.cc: Con::executef(this, 2, "onSelect", avar("%d", mSelectedControls[0]->getId()));
engine/gui/guiEditCtrl.cc: Con::executef(this, 2, "onSelect", avar("%d", mSelectedControls[0]->getId()));
engine/gui/guiEditCtrl.cc: Con::executef(2, "exec", filename);
engine/gui/guiFadeinBitmapCtrl.cc: Con::executef(this, 1, "click");
engine/gui/guiFadeinBitmapCtrl.cc: Con::executef(this, 1, "click");
engine/gui/guiInputCtrl.cc: Con::executef( this, 4, "onInputEvent", deviceString, actionString, "1" );
engine/gui/guiInputCtrl.cc: Con::executef( this, 4, "onInputEvent", "keyboard", keyString, "0" );
engine/gui/guiMenuBar.cc: Con::executef( this, 4, "onMenuSelect", Con::getIntArg(menu->id),
engine/gui/guiMenuBar.cc: Con::executef( this, 6, "onMenuItemSelect", Con::getIntArg(menu->id),
engine/gui/guiMenuBar.cc: Con::executef( this, 4, "onMenuSelect", Con::getIntArg(mouseDownMenu->id),
engine/gui/guiMessageVectorCtrl.cc: Con::executef(this, 2, "urlClickCallback", copyURL);
engine/gui/guiMLTextCtrl.cc: //Con::executef( this, 3, "onResize", Con::getIntArg( newExtent.x ), Con::getIntArg( newExtent.y ) );
engine/gui/guiMLTextCtrl.cc: Con::executef(this, 2, "onURL", url);
engine/gui/guiMLTextCtrl.cc: Con::executef( this, 3, "onResize", Con::getIntArg( mBounds.extent.x ), Con::getIntArg( mMaxY ) );
engine/gui/guiMouseEventCtrl.cc: Con::executef(this, 4, name, buf[0], buf[1], buf[2]);
engine/gui/guiPopUpCtrl.cc: Con::executef( this, 3, "onSelect", idval, mEntries[mSelIndex].buf );
engine/gui/guiPopUpCtrl.cc: Con::executef( this, 1, "onCancel" );
engine/gui/guiPopUpCtrl.cc: Con::executef( this, 3, "onSelect", idval, mEntries[mSelIndex].buf );
engine/gui/guiPopUpCtrl.cc: Con::executef( this, 1, "onCancel" );
engine/gui/guiTextEditCtrl.cc: Con::executef( this, 2, "onTabComplete", "1" );
engine/gui/guiTextEditCtrl.cc: Con::executef( this, 2, "onTabComplete", "0" );
engine/gui/guiTextListCtrl.cc: Con::executef(this, 3, "onSelect", Con::getIntArg(mList[cell.y].id), mList[cell.y].text);
engine/gui/guiTextListCtrl.cc: Con::executef( this, 2, "onDeleteKey", Con::getIntArg( mList[mSelectedCell.y].id ) );
engine/gui/guiTreeViewCtrl.cc: Con::executef(this, 3, "onContextMenu", buf1, buf2);
engine/gui/guiTreeViewCtrl.cc: Con::executef(this, 2, "onInspect", buf);
engine/gui/guiTreeViewCtrl.cc: Con::executef(this, 3, "onSelect", Con::getIntArg(obj->getId()), Con::getIntArg(rightMouse));
engine/gui/guiTreeViewCtrl.cc: Con::executef(this, 2, "onUnselect", buf);
#6
engine/platformMacCarb/macCarbOGLVideo.cc: Con::executef(2, "eval", script);
engine/platformMacCarb/macCarbOGLVideo.cc: //Con::executef(2, "exec", "scripts/CardProfiles.cs");
engine/platformMacCarb/macCarbOGLVideo.cc: //Con::executef(2, "exec", osProfiles);
engine/platformMacCarb/macCarbOGLVideo.cc: //Con::executef(2, "exec", settings);
engine/platformMacCarb/macCarbOGLVideo.cc: //Con::executef(2, "exec", settings);
engine/platform/platformRedBook.cc: Con::executef(2, "RedBookCallback", "PlayFinished");
engine/platformWin32/winOGLVideo.cc: Con::executef(2, "eval", script);
engine/platformWin32/winOGLVideo.cc: //Con::executef(2, "exec", "scripts/CardProfiles.cs");
engine/platformWin32/winOGLVideo.cc: //Con::executef(2, "exec", osProfiles);
engine/platformWin32/winOGLVideo.cc: //Con::executef(2, "exec", settings);
engine/platformWin32/winOGLVideo.cc: //Con::executef(2, "exec", settings);
engine/platformWin32/winV2Video.cc: Con::executef(2, "eval", script);
engine/sceneGraph/sceneLighting.cc: Con::executef(1, gCompleteCallback);
engine/sim/actionMap.cc: Con::execute(2, argv);
engine/sim/actionMap.cc: Con::execute(2, argv);
engine/sim/actionMap.cc: Con::execute( 2, argv );
engine/sim/actionMap.cc: Con::execute(2,argv);
engine/sim/netDownload.cc: Con::executef(4, "onFileChunkReceived", mMissingFileList[0], Con::getIntArg(mCurrentFileBufferOffset), Con::getIntArg(mCurrentFileBufferSize));
engine/sim/netGhost.cc: Con::executef(1, "onGhostAlwaysObjectReceived");
engine/sim/netGhost.cc: Con::executef(this, 1, "onGhostAlwaysObjectsReceived");
engine/sim/netGhost.cc: Con::executef(2, "onGhostAlwaysStarted", Con::getIntArg(ghostCount));
engine/game/fx/lightning.cc: Con::executef(mDataBlock, 5, "applyDamage",
engine/game/net/net.cc: Con::execute(mArgc, (const char **) mArgv+1);
engine/game/net/net.cc: Con::execute(mArgc+1, (const char **) mArgv);
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "start", "Querying LAN servers", "0");
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "start", "Querying master server", "0");
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "start", "Query favorites...", "0" );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "start", "Refreshing server...", "0" );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "update", "Switching master servers...", "0" );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "update", "Retrying the master server...", "0" );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "done", "No master servers found.", "0" );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "done", msg, "1");
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "ping", msg, Con::getFloatArg( progress ) );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "query", msg, Con::getFloatArg( progress ) );
engine/game/net/serverQuery.cc: Con::executef(1, "onClearGameTypes");
engine/game/net/serverQuery.cc: Con::executef(2, "onAddGameType", stringBuf);
engine/game/net/serverQuery.cc: Con::executef(1, "onClearMissionTypes");
engine/game/net/serverQuery.cc: Con::executef(2, "onAddMissionType", stringBuf);
engine/game/net/tcpObject.cc: Con::executef(this, 3, "onConnectRequest", addrBuf, idBuf);
engine/game/net/tcpObject.cc: Con::executef(this, 2, "onLine", line);
engine/game/net/tcpObject.cc: Con::executef(this, 1, "onDNSResolved");
engine/game/net/tcpObject.cc: Con::executef(this, 1, "onDNSFailed");
engine/game/net/tcpObject.cc: Con::executef(this, 1, "onConnected");
engine/game/net/tcpObject.cc: Con::executef(this, 1, "onConnectFailed");
engine/game/net/tcpObject.cc: Con::executef(this, 1, "onDisconnect");
engine/game/vehicles/vehicle.cc: Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg(mWaterCoverage), Con::getIntArg(mLiquidType));
engine/game/vehicles/vehicle.cc: Con::executef(mDataBlock,3,"onLeaveLiquid",scriptThis(), Con::getIntArg(mLiquidType));
02/14/2006 (11:59 am)
Engine/platformMacCarb/macCarbGL.cc: Con::executef(2, "setFSAABadge", aasamp>1?"true":"false");engine/platformMacCarb/macCarbOGLVideo.cc: Con::executef(2, "eval", script);
engine/platformMacCarb/macCarbOGLVideo.cc: //Con::executef(2, "exec", "scripts/CardProfiles.cs");
engine/platformMacCarb/macCarbOGLVideo.cc: //Con::executef(2, "exec", osProfiles);
engine/platformMacCarb/macCarbOGLVideo.cc: //Con::executef(2, "exec", settings);
engine/platformMacCarb/macCarbOGLVideo.cc: //Con::executef(2, "exec", settings);
engine/platform/platformRedBook.cc: Con::executef(2, "RedBookCallback", "PlayFinished");
engine/platformWin32/winOGLVideo.cc: Con::executef(2, "eval", script);
engine/platformWin32/winOGLVideo.cc: //Con::executef(2, "exec", "scripts/CardProfiles.cs");
engine/platformWin32/winOGLVideo.cc: //Con::executef(2, "exec", osProfiles);
engine/platformWin32/winOGLVideo.cc: //Con::executef(2, "exec", settings);
engine/platformWin32/winOGLVideo.cc: //Con::executef(2, "exec", settings);
engine/platformWin32/winV2Video.cc: Con::executef(2, "eval", script);
engine/sceneGraph/sceneLighting.cc: Con::executef(1, gCompleteCallback);
engine/sim/actionMap.cc: Con::execute(2, argv);
engine/sim/actionMap.cc: Con::execute(2, argv);
engine/sim/actionMap.cc: Con::execute( 2, argv );
engine/sim/actionMap.cc: Con::execute(2,argv);
engine/sim/netDownload.cc: Con::executef(4, "onFileChunkReceived", mMissingFileList[0], Con::getIntArg(mCurrentFileBufferOffset), Con::getIntArg(mCurrentFileBufferSize));
engine/sim/netGhost.cc: Con::executef(1, "onGhostAlwaysObjectReceived");
engine/sim/netGhost.cc: Con::executef(this, 1, "onGhostAlwaysObjectsReceived");
engine/sim/netGhost.cc: Con::executef(2, "onGhostAlwaysStarted", Con::getIntArg(ghostCount));
engine/game/fx/lightning.cc: Con::executef(mDataBlock, 5, "applyDamage",
engine/game/net/net.cc: Con::execute(mArgc, (const char **) mArgv+1);
engine/game/net/net.cc: Con::execute(mArgc+1, (const char **) mArgv);
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "start", "Querying LAN servers", "0");
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "start", "Querying master server", "0");
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "start", "Query favorites...", "0" );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "start", "Refreshing server...", "0" );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "update", "Switching master servers...", "0" );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "update", "Retrying the master server...", "0" );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "done", "No master servers found.", "0" );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "done", msg, "1");
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "ping", msg, Con::getFloatArg( progress ) );
engine/game/net/serverQuery.cc: Con::executef( 4, "onServerQueryStatus", "query", msg, Con::getFloatArg( progress ) );
engine/game/net/serverQuery.cc: Con::executef(1, "onClearGameTypes");
engine/game/net/serverQuery.cc: Con::executef(2, "onAddGameType", stringBuf);
engine/game/net/serverQuery.cc: Con::executef(1, "onClearMissionTypes");
engine/game/net/serverQuery.cc: Con::executef(2, "onAddMissionType", stringBuf);
engine/game/net/tcpObject.cc: Con::executef(this, 3, "onConnectRequest", addrBuf, idBuf);
engine/game/net/tcpObject.cc: Con::executef(this, 2, "onLine", line);
engine/game/net/tcpObject.cc: Con::executef(this, 1, "onDNSResolved");
engine/game/net/tcpObject.cc: Con::executef(this, 1, "onDNSFailed");
engine/game/net/tcpObject.cc: Con::executef(this, 1, "onConnected");
engine/game/net/tcpObject.cc: Con::executef(this, 1, "onConnectFailed");
engine/game/net/tcpObject.cc: Con::executef(this, 1, "onDisconnect");
engine/game/vehicles/vehicle.cc: Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg(mWaterCoverage), Con::getIntArg(mLiquidType));
engine/game/vehicles/vehicle.cc: Con::executef(mDataBlock,3,"onLeaveLiquid",scriptThis(), Con::getIntArg(mLiquidType));
#7
Well, have you considered that the arguments passed to the executef function might relate to the arguments for the callback?
02/14/2006 (12:52 pm)
Yes, thank you, that's the result of a find in files for Con::executef.Well, have you considered that the arguments passed to the executef function might relate to the arguments for the callback?
#8
Do you think it will be usefull to do a documentation in TDN only for the datablock ?
is the list below exhaustive for the datablock ?
~/Torque/engine/game$ grep -i "con::execute" * | grep -i mdatablock
gameBase.cc: Con::executef(mDataBlock,2,"onAdd",scriptThis());
gameBase.cc: Con::executef(mDataBlock,2,"onNewDataBlock",scriptThis());
gameBase.cc: Con::executef(mDataBlock,2,"onRemove",scriptThis());
item.cc: Con::executef(mDataBlock, 2, "onStickyCollision", scriptThis());
item.cc: Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg(mWaterCoverage), Con::getIntArg(mLiquidType));
item.cc: Con::executef(mDataBlock,3,"onLeaveLiquid",scriptThis(), Con::getIntArg(mLiquidType));
pathCamera.cc: Con::executef(mDataBlock,3,"onNode",scriptThis(), Con::getIntArg(node));
player.cc: Con::executef(mDataBlock,2,"doDismount",scriptThis());
player.cc: Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg(mWaterCoverage), Con::getIntArg(mLiquidType));
player.cc: Con::executef(mDataBlock,3,"onLeaveLiquid",scriptThis(), Con::getIntArg(mLiquidType));
player.cc: Con::executef(mDataBlock,3,"animationDone",scriptThis());
player.cc: Con::executef(mDataBlock,3,"onLeaveMissionArea",scriptThis());
player.cc: Con::executef(mDataBlock,3,"onEnterMissionArea",scriptThis());
projectile.cc: Con::executef(mDataBlock, 4, "onExplode", scriptThis(), buffer, Con::getFloatArg(mFadeValue));
projectile.cc: Con::executef(mDataBlock, 6, "onCollision",
shapeBase.cc: Con::executef(mDataBlock,5,"onImpact",scriptThis(), obj->getIdString(), buff1, buff2);
shapeBase.cc: Con::executef(mDataBlock,5,"onImpact",scriptThis(), "0", buff1, buff2);
shapeBase.cc: Con::executef(mDataBlock,3,"onDamage",scriptThis(),delta);
shapeBase.cc: Con::executef(mDataBlock,4,"onTrigger",scriptThis(),buf1,buf2);
shapeBase.cc: Con::executef(mDataBlock,3,"onDamage",scriptThis(),delta);
shapeBase.cc: Con::executef(mDataBlock,3,script,scriptThis(),lastState);
shapeBase.cc: Con::executef(mDataBlock,4,"onMount",scriptThis(),obj->scriptThis(),buff1);
shapeBase.cc: Con::executef(mDataBlock,4,"onUnmount",scriptThis(),obj->scriptThis(),buff1);
shapeBase.cc: Con::executef(mDataBlock,3,"onEndSequence",scriptThis(),slot);
shapeBase.cc: Con::executef(mDataBlock,5,"onCollision",scriptThis(),object->scriptThis(), buff1, buff2);
shapeBase.cc: Con::executef(mDataBlock, 3, "onForceUncloak", scriptThis(), reason ? reason : "");
trigger.cc: Con::executef(mDataBlock, 3, "onLeaveTrigger", scriptThis(), Con::getIntArg(pScene->getId()));
trigger.cc: Con::executef(mDataBlock, 3, "onEnterTrigger", scriptThis(), Con::getIntArg(enter->getId()));
trigger.cc: Con::executef(mDataBlock, 3, "onLeaveTrigger", scriptThis(), remove->scriptThis());
trigger.cc: Con::executef(mDataBlock, 2, "onTickTrigger", scriptThis());
02/14/2006 (11:25 pm)
Thks.Do you think it will be usefull to do a documentation in TDN only for the datablock ?
is the list below exhaustive for the datablock ?
~/Torque/engine/game$ grep -i "con::execute" * | grep -i mdatablock
gameBase.cc: Con::executef(mDataBlock,2,"onAdd",scriptThis());
gameBase.cc: Con::executef(mDataBlock,2,"onNewDataBlock",scriptThis());
gameBase.cc: Con::executef(mDataBlock,2,"onRemove",scriptThis());
item.cc: Con::executef(mDataBlock, 2, "onStickyCollision", scriptThis());
item.cc: Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg(mWaterCoverage), Con::getIntArg(mLiquidType));
item.cc: Con::executef(mDataBlock,3,"onLeaveLiquid",scriptThis(), Con::getIntArg(mLiquidType));
pathCamera.cc: Con::executef(mDataBlock,3,"onNode",scriptThis(), Con::getIntArg(node));
player.cc: Con::executef(mDataBlock,2,"doDismount",scriptThis());
player.cc: Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg(mWaterCoverage), Con::getIntArg(mLiquidType));
player.cc: Con::executef(mDataBlock,3,"onLeaveLiquid",scriptThis(), Con::getIntArg(mLiquidType));
player.cc: Con::executef(mDataBlock,3,"animationDone",scriptThis());
player.cc: Con::executef(mDataBlock,3,"onLeaveMissionArea",scriptThis());
player.cc: Con::executef(mDataBlock,3,"onEnterMissionArea",scriptThis());
projectile.cc: Con::executef(mDataBlock, 4, "onExplode", scriptThis(), buffer, Con::getFloatArg(mFadeValue));
projectile.cc: Con::executef(mDataBlock, 6, "onCollision",
shapeBase.cc: Con::executef(mDataBlock,5,"onImpact",scriptThis(), obj->getIdString(), buff1, buff2);
shapeBase.cc: Con::executef(mDataBlock,5,"onImpact",scriptThis(), "0", buff1, buff2);
shapeBase.cc: Con::executef(mDataBlock,3,"onDamage",scriptThis(),delta);
shapeBase.cc: Con::executef(mDataBlock,4,"onTrigger",scriptThis(),buf1,buf2);
shapeBase.cc: Con::executef(mDataBlock,3,"onDamage",scriptThis(),delta);
shapeBase.cc: Con::executef(mDataBlock,3,script,scriptThis(),lastState);
shapeBase.cc: Con::executef(mDataBlock,4,"onMount",scriptThis(),obj->scriptThis(),buff1);
shapeBase.cc: Con::executef(mDataBlock,4,"onUnmount",scriptThis(),obj->scriptThis(),buff1);
shapeBase.cc: Con::executef(mDataBlock,3,"onEndSequence",scriptThis(),slot);
shapeBase.cc: Con::executef(mDataBlock,5,"onCollision",scriptThis(),object->scriptThis(), buff1, buff2);
shapeBase.cc: Con::executef(mDataBlock, 3, "onForceUncloak", scriptThis(), reason ? reason : "");
trigger.cc: Con::executef(mDataBlock, 3, "onLeaveTrigger", scriptThis(), Con::getIntArg(pScene->getId()));
trigger.cc: Con::executef(mDataBlock, 3, "onEnterTrigger", scriptThis(), Con::getIntArg(enter->getId()));
trigger.cc: Con::executef(mDataBlock, 3, "onLeaveTrigger", scriptThis(), remove->scriptThis());
trigger.cc: Con::executef(mDataBlock, 2, "onTickTrigger", scriptThis());
Associate Orion Elenzil
Real Life Plus
but the line
datablock PlayerData(MyAvatar) {....};
is sort of a special function.
It's actually best not to think of it as a function at all.
If i were to rewrite that line in pseudo-C++,
it'd look more like this:
MyAvatar = new datablock(of type PlayerData)
{
with these data fields initialized...
}
basically after the line executes,
the result is MyAvatar,
which is a datablock of type PlayerData,
with data initialized from within the braces.
check out this TDN page for more.