Periodically Mouse Down Event for Button (GUI)
by beyond · in Torque Game Engine Advanced · 02/22/2011 (7:04 am) · 2 replies
Hi!
I need to do "Continuous Pressing" Button,
which must be work with "Auto-Repeat Clicking"
while Mouse button Pressed... I try to use
MouseDown event, but it's executed once..
But i need a event, which can be executing
periodically, while button pressed...
Thanks for any help.
I need to do "Continuous Pressing" Button,
which must be work with "Auto-Repeat Clicking"
while Mouse button Pressed... I try to use
MouseDown event, but it's executed once..
But i need a event, which can be executing
periodically, while button pressed...
Thanks for any help.
#2
function your_founction(%val)
{
//your logic
}
check if(%val == 1) then call a schedule function to repeat itself.
else if(%val == 0) stop the schedule function.
Hope this will help.
03/06/2011 (10:12 pm)
You can use movemap.bind("your_function");function your_founction(%val)
{
//your logic
}
check if(%val == 1) then call a schedule function to repeat itself.
else if(%val == 0) stop the schedule function.
Hope this will help.
Torque Owner Robert Fritzen
Phantom Games Development
Be cautious though, you don't want to send multiple calls to the same function at once, that would give you a nice infinite loop.