Game Development Community

How are callbacks connected to script?

by Aaron Miller · in Torque Game Builder · 09/20/2008 (10:50 am) · 6 replies

I've been poking around the source in order to learn how TorqueScript invokes TGB's functionality. In most cases it seems a simple matter of finding ConsoleMethod. But callbacks have me stumped.

Where does something like onLevelLoaded live? In VC++ I've searched "entire solution" and tried looking through the editor script itself, but can't find it.

#1
09/20/2008 (11:04 am)
EDIT: In another thread here I saw explained that Con::executef is used for callbacks, with the callback name in quotes. But shouldn't I still be able to find something like

Con::executef(this, 2, "onLevelLoaded" ...
#2
09/20/2008 (11:05 am)
Seach the scripts for ::onLevelLoaded. The function lives in script.
#3
09/20/2008 (11:37 am)
It looks like onLevelLoaded is actually called from script, look in levelManagement.cs
#4
09/20/2008 (12:10 pm)
::echo echo echo::
=)
#5
09/20/2008 (9:16 pm)
Found it. Thank you for such a fast response Michael and James (and on a Saturday, too-- you guys are troopers!).
#6
09/22/2008 (10:31 am)
Happy to help out Aaron. You'll find there are a few of us that live and breathe the forums, even on weekends and holidays....except Halloween....