How do I

0 favourites
  • 5 posts
  • Hi guys,

    I need your desperate help for this. I'm a simple art teacher and i don't know much about programming.

    I completed this tutorial "Making an Interactive Treasure Map" <https://www.scirra.com/tutorials/322/making-an-interactive-treasure-map/page-1>

    everything is working great but i want to lock the level ( layout) after it has been viewed once. To make it more simple, after that the player has completed the first level ( or any other levels) and the next level has been shown i dont want the player to be able to access the previous level.

    I have been working with lots of instance var but no use. I have done everything like the tutorial and it works great but the tutorial does not have this function as well.

    I would really appropriate your helps,

    Thanks

  • Having not done that tutorial and you not providing a capx, it is hard to guess at best approach.

    1 option:

    Create Variable Level1, level2, level3 etc

    On start of layout level1 set Level1 to 1. On start of layout level2 set level2 to 1 etc

    Now you have a check on your map you can disable buttons or make sprites no clickable by putting in condition that level1 = 0

    I see it uses some variables locationnumber and latestknownlocation and checks that player is greater than or equal

    Just create a new event checking that player locationnumber is less than players location make invisible or whatever

  • If you want it semi-permanent (even if they close and open the game) add the WebService object and set a localkey with "1-layout" to start. on each map advancement, increment that name. When choosing the layout to load, make sure that the layout name is corresponding to that value ("1-layout). When you are ready to give them the next layout, set it to "2-layout"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just create a new event checking that player locationnumber is less than players location make invisible or whatever

    Thank u guys, it worked (not what i exactly had in mind but it is good)

    I did do exactly what u said locationnumber<location and magic thank u DUTOIT

    IndieKiwi, thank u for ur respond and help. Since im new to C2 is WebService the same as Webstorage ?

    Sry for the stupid question

    Thank u again

  • >

    > Just create a new event checking that player locationnumber is less than players location make invisible or whatever

    >

    Thank u guys, it worked (not what i exactly had in mind but it is good)

    I did do exactly what u said locationnumber<location and magic thank u DUTOIT

    IndieKiwi, thank u for ur respond and help. Since im new to C2 is WebService the same as Webstorage ?

    Sry for the stupid question

    Thank u again

    Sorry i meant Webstorage, webservice is something else.

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