Regarding Mouse Input
by Encore · in Torque Game Builder · 12/19/2006 (2:29 am) · 3 replies
Hi all,
my games primary input is mouse . My game is similar to other games in that by pressing left mouse button the hero fires a missile . Now in tgb there are only ONMOUSEUP and ONMOUSEDOWN callbacks , i dont want my player to press the leftmousebutton each time he wants to fire a missile , instead if he holds it then my player should fire continuously .
Now how do i achieve it in tgb ?
please help
thanks
encore
my games primary input is mouse . My game is similar to other games in that by pressing left mouse button the hero fires a missile . Now in tgb there are only ONMOUSEUP and ONMOUSEDOWN callbacks , i dont want my player to press the leftmousebutton each time he wants to fire a missile , instead if he holds it then my player should fire continuously .
Now how do i achieve it in tgb ?
please help
thanks
encore
About the author
#2
i did this exactly before i posted this question but the problem is that the scheduler seems to act in weird ways . Could you please show me some code so that i can make sure i am doing the right way . And moreover i was wondering if there was any other good way to achieve it .
thanks once again
encore
12/19/2006 (3:43 pm)
Hi ward ,i did this exactly before i posted this question but the problem is that the scheduler seems to act in weird ways . Could you please show me some code so that i can make sure i am doing the right way . And moreover i was wondering if there was any other good way to achieve it .
thanks once again
encore
#3
Fish Game Tutorial.
One scheduler weirdness is that a dead hero can fire his gun if you are not careful. Learn how to use cancel() when your character dies. Documentation is in the TGB Reference.
12/31/2006 (4:49 pm)
You will find examples of the use of the scheduler in three tutorials: Whack-A-Mole Tutorial, Shooter Tutorial, andFish Game Tutorial.
One scheduler weirdness is that a dead hero can fire his gun if you are not careful. Learn how to use cancel() when your character dies. Documentation is in the TGB Reference.
Torque Owner Very Interactive Person