How do I variable

  • Lets say you didnt want the player to be able to advance to next level unless they achieved a certain score . Now correct me if im wrong but wouldn't that be a Boolean true or false or could you also do a compare variable im trying too see which one would be better . I have my score setup already but to make the game a challenge I want to set a score for them to beat on each level . As im still confused on local and global variables as in when should you use either or if that makes Sense

  • I guess easiest would be creating a global variable LevelUnlocked

    and on level one finished set it to 2

    on level two finished set it to 3

    etcetera

    And do a system compare variable to see if levelunlocked higher or equal to 3 to be able to go to level three..

    This way you'd only need one global variable to keep track of the user's progress

    Ofcourse you'd have to save it to webstorage to make sure when the user exits and restarts the game the progress isn't lost..

    I'm sure there are tutorials on unlocking levels in the tutorial section, but these are the basics..

  • Wow this sounds like a advance topic but thanks im see if YouTube have some videos on this

  • Wow this sounds like a advance topic but thanks im see if YouTube have some videos on this

    It's not advance at all once you step into array's world.

    The manual has a in-depth description about variable, I think it's better for you to read there instead of asking people to explain basic functionality like this. The answer could be very long so you have the tendency to be replied with incomplete answer, simply because there's too much too tell.

  • So what is you saying that its going to take an array to accomplish what im trying too do

  • So what is you saying that its going to take an array to accomplish what im trying too do

    You can do so with variables. But array will make it perfect and flexible, it's an intermediate stuff, if you haven't understand variables fully, don't go into array yet, study the variables first.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just actually finished reading the entire manual today and actually towards the end of the book was on arrays

  • If you want to learn about Array try this tutorial

    https://www.scirra.com/tutorials/1090/using-arrays

  • Lordshiva1948 your time capx was pretty cool I wonder can you do the same if you wanted a graphical in game timer on screen also. But I was able to import my number graphics well using that example . I can tell u know this engine pretty well. Now I just have to figure out a perfect way to disable player controls while that timer is goin

  • lilvee1989 you could do it like this

  • I appreciate your help !!

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