Creating SimObjects via C
by Jason Swearingen · in Torque Game Builder · 07/08/2005 (3:17 pm) · 2 replies
I am looking at how TorqueScript creates objects such as ActionMaps and Datablocks.
What is the best (or most supported) way of creating these via C++?
I know for regular simObjects, you can do what main.cc does, ex:
But I'm not sure if you can do something that nice for DataBlocks, and maybe the code snippet isnt the best way ???
Hence my question.. if you happen to know a good/best way of declaring objects via C++, please post!
Thanks much
-Jason
What is the best (or most supported) way of creating these via C++?
I know for regular simObjects, you can do what main.cc does, ex:
ActionMap* globalMap = new ActionMap;
globalMap->registerObject("GlobalActionMap");But I'm not sure if you can do something that nice for DataBlocks, and maybe the code snippet isnt the best way ???
Hence my question.. if you happen to know a good/best way of declaring objects via C++, please post!
Thanks much
-Jason
#2
This engine is one piece of work, I am impressed at how spiffy it is.. and to think i was considering writing my own engine from scratch!
07/09/2005 (1:12 am)
Thanks Melv. I would have missed the unregisterObject call!This engine is one piece of work, I am impressed at how spiffy it is.. and to think i was considering writing my own engine from scratch!
Associate Melv May
If you look at "registerObject()" as well as "unregisterObject()" you can see the actual processes involved as these two calls are really just helpers and therefore consist of a set of more important calls.
- Melv.