Basic Program Flow
by Erik Alburg · in Torque Game Engine · 02/13/2007 (3:15 pm) · 0 replies
Hi everyone....
I am still trying to wrap my head around how Torque uses messages/triggers/events to make a call to a function that I have created. I have found the tutorial on collisions, so I can understand how to make custom functions calls when a collision happens... but how about other events?
In window's programming there is game loop that can be used to check times/wait for events/ect... is there such a loop for Torque and is that the proper way to react to an event/trigger. For example, having an AI bot go into attack mode when a shot is fired (either hitting it or missing it within a certain distance).
I have tried to figure this one out on my own... using the ~ screen to identify functions as they are being called. But I don't know which functions are making the calls and why.
Can someone explain this to me or point me to a tutorial?
Thanks.
I am still trying to wrap my head around how Torque uses messages/triggers/events to make a call to a function that I have created. I have found the tutorial on collisions, so I can understand how to make custom functions calls when a collision happens... but how about other events?
In window's programming there is game loop that can be used to check times/wait for events/ect... is there such a loop for Torque and is that the proper way to react to an event/trigger. For example, having an AI bot go into attack mode when a shot is fired (either hitting it or missing it within a certain distance).
I have tried to figure this one out on my own... using the ~ screen to identify functions as they are being called. But I don't know which functions are making the calls and why.
Can someone explain this to me or point me to a tutorial?
Thanks.