analog joystick + 3 other buttons how to make it work?

beatragebeatrage Member Posts: 126
I am using code monkey' s analog stick with only one rule for moving and reset to center and the angle and the distancefromcenter maths. the joypad is ok but i also have other 3 buttons. they are the FIRE button , the SPECIAL button and the INGAME menu(hidden button).

ok the joystick is working perfect and also all my buttons. BUT when i put the joystick and all the buttons and try to move and shoot at the same time only one can work without the other been touched. Any hints here?

how can I use the touch1, touch2, touch3, touch4 and touch5 with all this specific buttons ( the analog + the other 3 buttons)??

Using the accelerometer + 3 buttons is ok but only with the joypad + the other 3 buttons this happens!

does anyone knows how to fix this error?

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    I'm pretty sure you have to have all 5 touches in each and every button/joystick. And duplicate them all 5 times like in the joystick demo.

    You never know in which order people will tap the buttons/joysticks
  • beatragebeatrage Member Posts: 126
    I got it all alone!

    i created 2 touch actors and constrained their positions to touchX and Y .1 and touchX and Y.2
    and created a touch pressed rule on evey actor button/analog stick and 2 rules inside the main rule for these 2 touch actors to work with the buttons/analog stick . with only 2 touch actors i could easyly work with my 7 touch buttons. also i took a look at code monkey touch events and created my own reset position for these 2 touch actor every 0.1 seconds if the colision with other buttons are false. that's to keep one of these 2 actors in hold in case i am holding it to move the analog stick.

    thanks code monkey nice example. in torque it's more easy to control the touch because it's coding but here it's more easy to control the events from the game scenes.
Sign In or Register to comment.