Where are the script events?
by Trent · in Torque Game Engine · 08/16/2006 (4:49 pm) · 5 replies
I just bought TGE & TSE last week, and I've been reading loads and loads of tutorials and the documentation. I've found all the descriptions of ShapeBaseData etc and their fields and methods... but what about the events?
I'm just a little lost on this one. I know there are events. I've seen onCollision, onAdd, onWake and onSleep. I don't really know what the last 3 are for, but I've seen them in passing. Is there a nice list somewhere like there is with the datablocks? For example, ok I know onCollision exists, but what about if I click on an object with the mouse? Do I get a notification? I'd assume it's called onClick(), but I can't seem to find any info on events using the search.
Is there any docs on events?
I'm just a little lost on this one. I know there are events. I've seen onCollision, onAdd, onWake and onSleep. I don't really know what the last 3 are for, but I've seen them in passing. Is there a nice list somewhere like there is with the datablocks? For example, ok I know onCollision exists, but what about if I click on an object with the mouse? Do I get a notification? I'd assume it's called onClick(), but I can't seem to find any info on events using the search.
Is there any docs on events?
About the author
#2
08/16/2006 (6:47 pm)
Thanks Paul, I'll give it a shot soon (I'm at work currently).
#3
I think I posted this in the wrong forum too...
08/16/2006 (9:28 pm)
Hmmm ok I did that but it only shows fields and methods, not events.I think I posted this in the wrong forum too...
#4
Look around for Con::executef calls. Those are how the C++ code activates script events.
08/16/2006 (10:47 pm)
Trent, you will need to look at the C++ code for that.Look around for Con::executef calls. Those are how the C++ code activates script events.
#5
Oh and to Paul, the onClick that I would want would be a ray test on all objects in the world, pretty much like the world editor does.... hmm... *runs off to look at the editor source*
08/16/2006 (11:01 pm)
Thanks Peter!Oh and to Paul, the onClick that I would want would be a ray test on all objects in the world, pretty much like the world editor does.... hmm... *runs off to look at the editor source*
Torque Owner Paul /*Wedge*/ DElia