"Level Selector" Page

jeffheif1jeffheif1 Member Posts: 10
edited November -1 in Working with GS (Mac)
Hey, I was wondering if someone could give me some advice on a "levels" page. I want it to be a page from the main menu where you choose the level you want to play, but you can only play the levels you have already played before. Also, it would be cool to make a per-level high score, but I think that would take WAY too long.

My idea was to have a "level selector" attribute. After level 1, I would make the attribute = 1. After level 2, I would make the attribute = 2, and so on. This way, I could say "if attribute = 1, display level 1 on the level selector page", and "if attribute = 2, display levels 1 and 2 on attribute page" and so on. While I think this would work, It would be EXTREMELY time consuming. Does anybody else have another way to do it? or just any suggestions?

Thanks in advance!
jeffheif1

Comments

  • TyvanTyvan Member Posts: 29
    Well one approach could be to have your controls for selecting the levels all appear on the level selection page with color.alpha set to 0 so they are "hidden". Then put a rule in all of them that sets self.color.alpha = 1 to show them when your attribute is higher than that level's number. So it could look something like this:
    Level 2 has this:
    if game.levelselector > 1 set attribute self.color.alpha = 1

    Level 3 has this:
    if game.levelselector > 2 set attribute self.color.alpha = 1

    etc
Sign In or Register to comment.