Odd issue with touch

0 favourites
  • 5 posts
From the Asset Store
Surena Touch
$2.50 USD
A wrap from official Touch plugin to export touch/mouse input to other plugins.
  • Hello All

    Having a small issue with touch controls on the android APK build of a project i'm creating.

    For some reason one button that takes you to another screen has to be pressed twice for it to work , there are other instances of the exact same button with the exact same code , yet it does not happen there.

    Another issue but similar is a Resetting save button , when pressed it should ask you if you are sure , and once you touch yes it will delete your save , this works fine however you have to do this twice , as if the pressing yes does not register the first time.

    I have removed Mouse input from the project which was in previously , however this has made no difference to these bugs.

    Thanks for you time.

    Ryan.

  • Does this happen in APK only or in preview as well?

    Please share your capx (preferably) or a screenshot of your event sheet.

  • I'll post a screen shot as soon as i can for both events , this seems to happen only in the apk , at least it only happens once per boot up in the test build but consistently in the APK.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • https://i.imgur.com/aHbqwkM.png

    This is the file reset code.

    https://i.imgur.com/d53fOXH.png

    This is the Code for the tutorial menu transition screen its the one that says go to Tutorial 3 is the one causing problems even though it is identical to the others

  • With tutorial buttons what happens is two events are triggered.

    Change events 11-12 to this:

    On touched NextButton
       TutorialNo=1 -> Set TutorialNo to 2
                       Go to Tutorial2
      
       Else
       TutorialNo=2 -> Set TutorialNo to 3
                       Go to Tutorial3
    [/code:3i2nqh5u]
    
    "Else" is important!
    Do the same with BackButton.
    
    Also, there is no point in changing button's animation speed, because the layout will be changed immediately.
    If you want to highlight the button when it's touched, do something like this:
    
    On touched NextButton -> NextButton set animation frame to 1
    On any touch end  -> NextButton set animation frame to 0
    On NextButton tap -> .... (those sub-events from the code above)
    
    As for the Reset buttons, there could be a similar problem with the sequence of events. It's impossible to tell by just the screenshot.
    Also (I've seen this mistake in another project), when you reset data in Local Storage, you need to wait for "LocalStorage On All Set Complete" event. If you don't wait and immediately try to read data from Local Storage, you'll get previous (unchanged) values.
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)