Game Development Community

Understanding the different hooks to T2D

by Jason Swearingen · in Torque Game Builder · 07/07/2005 (12:49 am) · 2 replies

I want to make sure I am considering all the major ways of interfacing (hooking via C++) the T2D functionality.

Here's a list of the items I know to think about:

ConsoleFunctions
ConsoleMethods

SimObjects
SimObjects with parrents
SimObjects as DataBlocks

local Variables
global Variables

... is there anything I am missing from this list?

Thanks,

-Jason

#1
07/07/2005 (10:13 am)
For starters...

Variables...
void setVariable(const char *name, const char *value);
void setBoolVariable (const char* name,bool var);
void setIntVariable (const char* name,S32 var);
void setFloatVariable(const char* name,F32 var);
const char* getVariable(const char* name);
bool getBoolVariable (const char* name,bool def = false);
S32 getIntVariable (const char* name,S32 def = 0);
F32 getFloatVariable(const char* name,F32 def = .0f);
bool addVariable(const char *name, S32 type, void *pointer);
bool removeVariable(const char *name);
void setLocalVariable(const char *name, const char *value);
const char* getLocalVariable(const char* name);

Code...
const char *execute(SimObject *object, S32 argc, const char *argv[]);
const char *executef(SimObject *, S32 argc, ...);
const char *evaluate(const char* string, bool echo = false, const char *fileName = NULL);
const char *evaluatef(const char* string, ...);
char *getReturnBuffer(U32 bufferSize);
char *getArgBuffer(U32 bufferSize);
char *getFloatArg(F64 arg);
char *getIntArg (S32 arg);
bool isFunction(const char *fn);
bool expandScriptFilename(char *filename, U32 size, const char *src);


- Melv.
#2
07/07/2005 (11:28 am)
Thanks Melv, I am starting by emulating the behavior of TorqeScript (hence the items I listed)

Though the functions you mentioned are good to investigate independantly also.