Figuring out how things work...
by Jordan Thompson · in Torque Game Engine · 09/23/2004 (4:54 pm) · 2 replies
I've been going through as many tutorials as I can find and I ran across a tutorial including an example level:
http://www.codesampler.com/torque.htm#Tutorial%20Base
The tutorials are quite helpful but what I don't understand is tracking down how things work. For example in this example he has a timer on the client's HUD... After searching the scripts game\client\scripts\client.cs, theres a function:
So I grep'd all the files trying to find "setTime" but nothing but this client.cs came up... This isn't the first of these "ghost" functions I come across... I've tried to track down other things and sometimes they lead me to the common scripts but mostly nothing will come up... Where are these functions being defined? Are the specified in the engine itself which is why they're not showing up in my search through the scripts? This seems to happen a lot actually... I see some feature then try to trace back (because I might want it in my game, etc) and I get the function calls that aren't any of the scripts...
Any help is appreciated, thanks...
- Jordan
http://www.codesampler.com/torque.htm#Tutorial%20Base
The tutorials are quite helpful but what I don't understand is tracking down how things work. For example in this example he has a timer on the client's HUD... After searching the scripts game\client\scripts\client.cs, theres a function:
function clientCmdSyncClock(%time)
{
// Store the base time in the hud control it will automatically increment.
HudClock.setTime(%time);
}So I grep'd all the files trying to find "setTime" but nothing but this client.cs came up... This isn't the first of these "ghost" functions I come across... I've tried to track down other things and sometimes they lead me to the common scripts but mostly nothing will come up... Where are these functions being defined? Are the specified in the engine itself which is why they're not showing up in my search through the scripts? This seems to happen a lot actually... I see some feature then try to trace back (because I might want it in my game, etc) and I get the function calls that aren't any of the scripts...
Any help is appreciated, thanks...
- Jordan
About the author
I like to develop games and run the following websites: http://www.indiegamesstudio.com
#2
Thanks,
Jordan
09/24/2004 (5:04 pm)
Ah... I see... I stumbled across guiClockHud using the menu editor (F10 ) in the example but still didn't know where the .cc file was, so thanks for your post. I assume there is an API on the site so I'll go look for it... Thanks,
Jordan
Torque Owner Redacted