Torque 3D 3.8
Con::execute Function
ConsoleValueRef execute(SimObject * object, S32 argc, const char* argv[], bool thisCallOnly = false);

Call a Torque Script member function of a SimObject from C/C++ code. @param object Object on which to execute the method call. @param argc Number of elements in the argv parameter (must be >2, see argv) @param argv A character string array containing the name of the member function to call followed by an empty parameter (gets filled with object ID) followed by arguments to that function. @code // Call the method setMode() on an object, passing it one parameter. 

char* argv[] = {"setMode", "", "2"}; char* result = execute(mysimobject, 3, argv); @endcode

this function restores the console stack on return.

Copyright (c) 2015. All rights reserved.
What do you think about this topic? Send feedback!