What does this variable do?
by Ben Ewing · in Torque Game Engine · 02/11/2006 (9:19 pm) · 3 replies
$mvTriggerCount
Anyone know what that does in
"
function mouseFire(%val)
{
$mvTriggerCount0++;
error("IS THIS WORKING!!!!");
}
"
Anyone know what that does in
"
function mouseFire(%val)
{
$mvTriggerCount0++;
error("IS THIS WORKING!!!!");
}
"
#2
02/12/2006 (3:38 am)
The $mvWhatever variables hook into the move manager, which is responsible for routing them to the control object.
#3
The mapping goes playerData -> ClassName -> ClassName::OnTrigger(%this,%obj,%triggerNum,%val)
A case statement can be used with %triggerNum to set which of the 6 triggers gets activated and calls the function within that case. Each time the OnTrigger gets called I believe the appropriate trigger gets reduced by one. It can probably go higher than 1, if you were to call it fast enough though.
02/20/2006 (10:25 am)
There are 6 trigger events. Whenever your code executes a mvTriggerCountx it increases the value by one. The the Datablock for the playerData has a classname that can be used to trigger specific code. The default mappings can be overwritten in this class.The mapping goes playerData -> ClassName -> ClassName::OnTrigger(%this,%obj,%triggerNum,%val)
A case statement can be used with %triggerNum to set which of the 6 triggers gets activated and calls the function within that case. Each time the OnTrigger gets called I believe the appropriate trigger gets reduced by one. It can probably go higher than 1, if you were to call it fast enough though.
Torque Owner Dracola