Repeating action while holding stylus on the screen

Talk about making games.

Repeating action while holding stylus on the screen

Postby regis » Wed Jul 27, 2005 4:50 pm

Hi to you all,
I wonder how I can repeat the same action (some scripts) as long as the stylus touches the PPC screen and stops when it is removed (to be more precise, I would like to put an "autofire" option in my "shoot them up!" game so that the user does not have to tap too much on his screen to play: my game uses on screen buttons).
When I use the "mouse button down" event, the action plays only once. :-(
Many thanks to you all and long life to GE!
Regards
Régis
Many thanks,
Regis
regis
 
Posts: 48
Joined: Tue Nov 09, 2004 10:51 am
Location: France
Score: 1 Give a positive score

Postby BeyondtheTech » Wed Jul 27, 2005 8:36 pm

Since I don't have Game Editor Pro installed here at work, I'm theorizing that you can institute a global variable that will be turned ON for a Mouse Down event and and OFF for a separate Mouse Up event. As long as the variable is ON (or == 1), the ship will fire.
User avatar
BeyondtheTech
 
Posts: 270
Joined: Wed Mar 30, 2005 6:34 am
Location: Edison, NJ
Score: 4 Give a positive score

Postby makslane » Thu Jul 28, 2005 12:32 am

Other solution is create a timer on Mouse Button Down and destroy on Mouse Button Up.

In the timer event, fire your bullet
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Repeating action while holding stylus on the screen

Postby regis » Thu Jul 28, 2005 8:10 am

Many thanks to both of you: it's a great help!
Regards
Regis
Many thanks,
Regis
regis
 
Posts: 48
Joined: Tue Nov 09, 2004 10:51 am
Location: France
Score: 1 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest