There are times when we don't know the name of the method of a
SimObject instance while writing a script code. In these circumstances,
we need to be able to call the method of a
SimObject instance based on a variable. This recipe will show us how to use the
method to execute another method, with possible passed-in arguments.
We will be adding a new TorqueScript function to a project based on the Torque 3D
Full template and try it out using the
Empty Terrain level. If you haven't already, use the Torque Project Manager (
Project Manager.exe) to create a new project from the
Full template. It will be found under the
My Projects directory. ...