Input related question
by Jeff Murray · in Torque Developer Network · 06/21/2006 (8:59 am) · 1 replies
I am trying to wrap my brain around exactly how user input is handled. The script level is fairly straightforward. You just map various inputs to script functions. But with respect to say, a mouseFire event, this is the script code exectued.
function mouseFire(%val)
{
$mvTriggerCount0++;
}
There is not much of a clue here how incrementing this variable translates into the player firing his weapon. So what is it that I am not seeing / need to look at?
I would like to know where the $mvTriggercount0 variable exists (is it a script var, or is it a code var accessed by script?). I would also like to know how this variable is linked to firing a weapon.
function mouseFire(%val)
{
$mvTriggerCount0++;
}
There is not much of a clue here how incrementing this variable translates into the player firing his weapon. So what is it that I am not seeing / need to look at?
I would like to know where the $mvTriggercount0 variable exists (is it a script var, or is it a code var accessed by script?). I would also like to know how this variable is linked to firing a weapon.
Torque 3D Owner Pat Wilson
When a trigger is an odd number, the game will consider this trigger to be active, and it will also increment the trigger to make it even again. It is a bit convoluted, to be sure, but that's how it works. What is done with the trigger is up to the class of the object. In your case, you want to look at player.cc and see where it looks for triggers on the incomming move.