Unlock Level Problem

triton13triton13 Member Posts: 161
edited February 2012 in Working with GS (Mac)
Hey guys, I watched those videos by tshirtbooth and for some reason when I'm testing my game, it just doesn't unlock the levels when I go back to my level screen. What could be the problem? It still has my locked image up and won't let me click the level at all even though I have beat it.

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    Tip:
    always take the seconds needed to type in what a rule does …
    double click where it says Rule in its titleBar … and type away
    save time and frustration as your project becomes more complex
    also keeps you focused on what you want to make happen!

    Nest rules within the Rule for an event
    EX: your touch is released rule… could contain another Rule: when the touchX = releaseX

    if the actorAttribute Level = 2 … why is scene changing to 2?

    Sometimes when learning from a video … it is good to have a projectFile open …
    and pause the video to implement the code/actions in your project
    the video provides a great walk-through …
    but one should be doing the steps one at a time … rather than trying to remember the whole journey

    @};- MH
  • triton13triton13 Member Posts: 161
    I decided not to go with the multiscreen. Now I can get rid of a few of the attributes and stuff but it's still not working correctly. I'll play my game and beat level two, then I'll go out into my menu and click levels and they are all still locked except for level one.
  • triton13triton13 Member Posts: 161
    I think I figured out my problem, but I don't know where to put it. My UnlockLevels attribute was still equal to 1, it never changed. I need to make it so when it gets to another level it equals that level number. Where do I put this cause I was trying to do it and couldn't get it to work.
  • MotherHooseMotherHoose Member Posts: 2,456
    just before the changeScene behavior
    changeAttribute: game.unlock To; game.unlock+1

    @};- MH
  • triton13triton13 Member Posts: 161
    I put that in my level actor or in my game level? I tried it in the level actor and it doesn't work.
  • MotherHooseMotherHoose Member Posts: 2,456
    gameAttribute … everything in game can reference/manipulate this
    sceneAttribute … everything in scene can reference/manipulate this
    actor(self)Attribute … everything in the actor … and an unlockedActor in the sameScene … can reference/manipulate

    @};- MH
  • triton13triton13 Member Posts: 161
    Everywhere I put the change attribute it just doesn't work. When I tried it on my level 2 scene, it worked. When I added it to my level 3, 4 and 5 scene, it acts weird. I'll get to level 3 and go and check what I unlocked. It has level 1, 2 and 4 unlocked. I get to level 4 and level 7 is unlocked and 4, 5 and 6 are locked. What is going on?
  • MotherHooseMotherHoose Member Posts: 2,456
    okay stop … and add a Display Text to each scene … to display the game.Unlock

    good to always monitor what your attributesValues are while you are designing your game.
    I probably have at least 10 instances of a single DisplayText actor … each with something different to display till things are working right!

    @};- MH
  • triton13triton13 Member Posts: 161
    I fixed it but now I have a strange problem. It works on my computer just fine, but when I test on my device, it still shows that it's locked. What gives?
  • MotherHooseMotherHoose Member Posts: 2,456
    good once in while if something seems to work … save the project … close GS and reopen.
    sometimes it seems that all the old and all the new just confuse things.
    also if you are using viewer … clear out the old files and then reopen GSViewer.

    @};- MH
  • SimtasticSimtastic Member Posts: 18
    just before the changeScene behavior
    changeAttribute: game.unlock To; game.unlock+1

    @};- MH
    THANK YOU SO MUCH T_T i had same problem, kinda... and new to GS, so i wasn't sure how to put it the right way ^^
    Actually i had problems, because i changed the "door" separately on the screen, and tried to add actual changes in the "door" at the actor section, no wonder it didn't work,
    I'm glad you put so much endurance and energy in to helping people, : ))))))))
    Absolutely love you for this !
  • 3xL3xL Member Posts: 676
    why don't you just darken the colors of the digit picture instead of adding a whole new pic?

    when level is locked change attribute

    self.red to 0.2
    self.green to 0.2
    self.blue to 0.2


    when UNLOCKED change attribute


    self.red to 1
    self.green to 1
    self.blue to 1

    get your kilobytes back!!!!
Sign In or Register to comment.