Level select...Working!!!

charliehgreencharliehgreen ArizonaMember Posts: 233
Hello,
I was wondering if you guys could help me figure out how to make a level select code.
For example, I have the screen made, set, and ready to go =)

I have level 1 - 10 but I want it so you can only select the levels as you beat the previous level =(

Please help or link me to a video.

Thanks!

Comments

  • ClownmrminghuiClownmrminghui Member Posts: 18
    You can do a checker.

    Create a rule that says

    If level = or > [prerequisite level] , change [new level = 1]

    and then create another rule that says when touch is pressed and new level = 1, switch scene to new level.
  • ElfizmElfizm Member Posts: 489

    Have a table with one column (Boolean) and then rows. All except row one are false.

    Have a game attribute (integer) called current level.

    On each level have a rule that changes game.current level to what ever level your on.

    Then when you finish a level have a rule that changes tablevalue(table1,game.current level + 1, 1) to true.

    Then on your level section actors. The ones that display what number levels you want to go to. make them have a attribute called self.id. And another attribute that is a boolean called self.false and set it to false.
    And other one called self.true and set it to true.

    Then create a rule that if self.true is equal to tablevalue(table1,self.Id,1)
    AND
    Touch is pressed

    Go to scene or level you want.

    Add another separate rule.
    If self.false is equal to tablevalue(table 1,self.id,1)
    Change image to "locked"

    Otherwise
    Change to image "unlocked"

    Then on each actor change the self.Id to the level you want that actor to take the player to.

    Make sure you save the table when anything is changing it and you load it at the start of your game.

    I hope that helps and all the best

    Elfizm
  • charliehgreencharliehgreen ArizonaMember Posts: 233
    lol holy crap this sounds hard haha.

    Thanks for the help though guys, I will try my best.
Sign In or Register to comment.