Sticky Controls

FatalCrestFatalCrest Member Posts: 113
edited November -1 in Working with GS (Mac)
So, in my project I have 3 controls next to each starting from left to right:
Left Button, Jump Button, Right Button. They are at the bottom of the screen on a
layer above my main layer.

They are as close as they can be to each of each other, but not on top of each other at all.

Okay, now when I preview my game, I noticed if I touch any two of the three buttons at the
same time, it will run two controls at the same time forever and it's like if the buttons are
sticky and I can't seem to regain control over the controls. @_@

Can someone help me? My guy jumps and runs off the platforms because of this.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    if you are using mouse button down you must also add mouse inside to each. Or get rid of mouse and use touch is pressed (it automatically translates to mouse for the web with no code changes needed).
  • FatalCrestFatalCrest Member Posts: 113
    I'm only using touches, nothing else - Note Note -
    Sorry if I'm not clear enough! >.<
  • FatalCrestFatalCrest Member Posts: 113
    nobody?
  • VoidedSkyVoidedSky Member Posts: 1,095
    do you have an otherwise function in the accelerate attribute for the actor?
    and does your button make the actor stop moving when touch is released?
  • FatalCrestFatalCrest Member Posts: 113
    No otherwise function for the actor although my button does make the actor stop moving when touch is released. :3
  • FatalCrestFatalCrest Member Posts: 113
    anybody?
  • MightyBooshMightyBoosh Member Posts: 83
    I would create a rule with an attribute for each button which reads something like when touch is pressed make button 1 attribute true. Otherwise button 1 attribute is false

    Then make when button1 attribute true do something

    Use the same idea for all 3 buttons ( button attribute 2, 3 etc)
  • FatalCrestFatalCrest Member Posts: 113
    Okay I'll try something like that. I'll try to get back to this. ty :3
Sign In or Register to comment.