How do I make 2world go to right levels?Stuck..again...

0 favourites
  • 5 posts
From the Asset Store
This is a twin stick shooter similar to Enter the gungeon,Nuclear Throne, Helldivers & Soul knight for the mobile device
  • Hi guys,

    I'm trying to make a level select with webstorage. So i used the capx ramones send in this forum:

    the problem is that i have no idea how to make it go to the right levels in the second world. World one was easy, i just added level instance for each level (15 on world 1 in my game) as a second condition. So it would look like this. Array is 15 width 2 height and 1 depth

    touching: sprite ------------------------------------------------------------------------go to level 1

    array: value at(Sprite.level,currentworld) not locked

    sprite: level=1

    touching ---------------------------------------------------------------------------------go to level 2

    array: value at(Sprite.level,currentworld) not locked

    sprite: level=2

    etc......

    But when i reach the next world (level16) it will play level 1, level 16 will play level 2. How can i fix this? Tried several conditions but didn't find a solution.

    Thanks for taking the time to help me!!!!!

  • Would adding a global variable World help?

    Set it to 1 on world 1, to 2 on world 2, etcetera..

    And add the variable check into your code..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks for the reply, but no. I already tried that, no effect.....

  • Would adding a global variable World help?

    Set it to 1 on world 1, to 2 on world 2, etcetera..

    And add the variable check into your code..

    Nop already tried that.....

  • Solved: Only with world 2 I added the compare variable world =2. However it also should be in world 1. Because otherwise it will always play world1 levels because it comes first in the level sheet, so I added in world 1 compare variable world =1. Little bit dumb of me.... however thanks for the reply!

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