CLOSE
by Tim Tebow · in Torque Game Engine · 08/10/2007 (2:46 pm) · 6 replies
--
#2
c++ function called - loadExternalExe(){}
then in torque script I want to be able to have a function like
loadExec();
And it will reference that code in the engine and run it. Im very experienced in c++ but have never done something like hooking a scripting language into it.
Thanks,
08/10/2007 (5:47 pm)
Yes its a stand alone non torque executable but that really doesn't matter because I know the code in c++ to start another executable my question is *lets say* I have the followingc++ function called - loadExternalExe(){}
then in torque script I want to be able to have a function like
loadExec();
And it will reference that code in the engine and run it. Im very experienced in c++ but have never done something like hooking a scripting language into it.
Thanks,
#3
Search for "ConsoleFunction" and say "GetSimTime" in the code, and you should be able to write what you want pretty quickly.
08/10/2007 (5:57 pm)
You want to write a "ConsoleFunction".Search for "ConsoleFunction" and say "GetSimTime" in the code, and you should be able to write what you want pretty quickly.
#4
You can also read about it in the docs and I think the source headers should have details on it.
Edit: Seems Orion beat me too it :)
08/10/2007 (6:01 pm)
Have a look in the source for ConsoleFunction. You can also read about it in the docs and I think the source headers should have details on it.
Edit: Seems Orion beat me too it :)
#6
Just using the example I wanted to make sure I understood what it was doing befor I tried adding my own right...
so in concsole if I type " getSimTime(); " it should give a time shouldnt it? Mine dont it just shows this
"==>getSimTime();"
Again thanks for the good help guys!
EDIT
ok me being a dork didnt think about what I was doing what needs to be done for those that look at this and also are new at it you need to put the following
echo(getSimTime());
and it will work :)
Good Luck
08/10/2007 (6:38 pm)
Ok small but probably simple question -Just using the example I wanted to make sure I understood what it was doing befor I tried adding my own right...
so in concsole if I type " getSimTime(); " it should give a time shouldnt it? Mine dont it just shows this
"==>getSimTime();"
Again thanks for the good help guys!
EDIT
ok me being a dork didnt think about what I was doing what needs to be done for those that look at this and also are new at it you need to put the following
echo(getSimTime());
and it will work :)
Good Luck
Torque Owner Steve D