How do I get on screen controls to work correctly

0 favourites
  • 4 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • hi guys...For my game i need to have onscreen controls following this format one accelerator sprite on the bottom-right corner of the screen and two direction sprites(left and right) at the bottom left side.for now every thing is fine and seems to work but on testing on my phone...i cant have the accelerator down and still be able to move the car...i have to do one touch at a time...Why is that?

    heres what i use:

    touch:istouching leftCtrl go left

    touch:istouching rightCtrl go right

    touch:istouching accelerator accelerate

    I build my game without webgl as it speeds up the wole gameplay on my test device

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Usually this setup should work, if your actions are not conflicting..

    You could try using TouchID..

    From the Manual:

    Multi-touch

    The Touch object supports multi-touch. This is most useful with the On touched object and Is touching object conditions, which can for example detect if multiple on-screen touch controls are being used. This is sufficient for many games.

    For more advanced uses, the TouchID, XForID and YForID expressions can be used to track individual touches for different purposes. Each touch has a unique ID (which is an arbitrary number), and can be accessed using the TouchID expression in an event like On any touch start. The touch ID can then be stored in a variable and tracked using the XForID and YForID expressions. Finally comparing the TouchID in On any touch end indicates when that touch has been released.

  • ill try with touchid and get back to you.

  • LittleStain finally i went to use tapping to enable acceleration and deceleration(toggling) this enables me to control properly the vehicle...thank you for your time

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)