How to to expand the Scripting Language within C++ Torque Engine
by Dan - · 01/23/2004 (10:59 am) · 4 comments
Download Code File
This resource is mostly some documented C++ code that states how to create your own C++ functions that expand the functions available via the console and via any of the script files.
Read the comments within the attached consoleAddedCommands.cc for the real information. Also remember, the functions within the .cc file are to explain how to declare console functions, pass parameters and return parameters. Most people probally will not find the useful as additions to the engine.
To add the consoleAddedCommands.cc to your Torque Project and see how it all works:
1 Take the attached consoleAddedCommands.cc code and save it into the "engine\console" directory. This is a great directory to look at. If you have a script function you like to use, you can find the C++ code behind it!
2 Add the "consoleAddedCommands.cc" to your workspace or project.
3 Build a new exe.
4 Run the new exe.
5 In the game open the console window by using the "~" key.
6 Execute any of the newly added functions. I.E.
echo(returnNumberOfParametersPassed("1","2","3","4"));
How simple is that?
If its not post here or feel free to e-mail me.
dreamer_of_dreamers2000@yahoo.com
This resource is mostly some documented C++ code that states how to create your own C++ functions that expand the functions available via the console and via any of the script files.
Read the comments within the attached consoleAddedCommands.cc for the real information. Also remember, the functions within the .cc file are to explain how to declare console functions, pass parameters and return parameters. Most people probally will not find the useful as additions to the engine.
To add the consoleAddedCommands.cc to your Torque Project and see how it all works:
1 Take the attached consoleAddedCommands.cc code and save it into the "engine\console" directory. This is a great directory to look at. If you have a script function you like to use, you can find the C++ code behind it!
2 Add the "consoleAddedCommands.cc" to your workspace or project.
3 Build a new exe.
4 Run the new exe.
5 In the game open the console window by using the "~" key.
6 Execute any of the newly added functions. I.E.
echo(returnNumberOfParametersPassed("1","2","3","4"));
How simple is that?
If its not post here or feel free to e-mail me.
dreamer_of_dreamers2000@yahoo.com

Torque Owner Glen Farrell