How do I stop my levels skipping?

0 favourites
  • 4 posts
From the Asset Store
Unlock Levels, Worlds & skin plus add coins by watching ads
  • Hello, I have a strange problem with my game. It's a single layout that uses a global variable to determine the level. So if the level is level 1 it shows animation frame 1. If it's level 5 it shows animation frame 5. The game works fine on desktop browser but when played on mobile browser I get a level skipping issue.

    When you complete a level, the global variable gets 1 added to it. But when playing on mobile, its skips a level so I play level 0 (tutorial), then it jumps to level 2, then 4 occasionally it skips 3 levels and sometimes none at all. Usually it's 2.

    This only happens when I tap the next level button. If I click to another layout and come back I get the next level.

    Has anyone come across this before? Is it a timing issue or even a touch object issue adding to the Global? I can't see any issues in the debug when testing on browser. Any help would be very much appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well we need to see the events really, did you use touch or mouse? Do you have events true for both touch and click so it runs twice?

  • Could be an issue of using "Every Tick" somewhere? If the refresh rate is different on the phone display than the refresh rate the game was developed on. Causing games to respond oddly if not calculating certain things with delta time in mind.

  • Thank you both, I am using on touched rather than clicked. There is an Every Tick in the code but shouldn't have an affect on the on touched object to show the next level. I did add a Once If True but that didn't seem to change anything.

    I'll keep digging and if I can't resolve I'll post some screens of what I have.

    Thanks again, your input is appreciated!

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