How do you unlock levels? My method doesn’t work.

ShaunEleryShaunElery Member, PRO Posts: 148
At the end of each level when my hero collides with a goal actor, the goal actor tells game attribute “Level 1 beat” to become true, and then switches scenes back to the menu.

On the menu my Level 2 button has a rule that only works when "Level 1 beat" is true. (and so on for 15 levels. ) However, when I test the game in preview the attributes don’t hold.

If I beat level 1, 2 unlocks like it should. And when I beat level 2, 3 unlocks like it should BUT level 1 has become locked again. Something caused "Level 1 beat" to become false.

Any ideas on what could be wrong?

Comments

  • gamesfuagamesfua Member Posts: 723
    Are you talking about when you load the game up again the levels go back to locked? If so, you're going to need to investigate load/save attributes. That said, sometimes ga viewer won't accurately load and save when you quit out of it. An ad hoc build is your best bet to test load/save.
    Aside from that it could simply be a change attribute somewhere. Something is telling level 1 to boolean false. A quick way around this for the time being is to say IF you beat level 4 then every level prior becomes unlocked. That should reenforce the boolean switch. But thats just a quick momentary fix. I'd investigate your code and or look into that load/save i talked about at the beginning.
  • ShaunEleryShaunElery Member, PRO Posts: 148
    No, it's not when I reload. It's when I go back to the menu scene durring the current session.

    Anyway, I think I will change to an interger attribute and check to see if the level is less than < that. That way everything is only checking a single attribute.

    thanks!
  • jimbo340jimbo340 Member Posts: 55
    @ShaunElery Tshirtbooth does a great tutorial on level locking just look it up on YouTube (would put a link but am on phone)

    Hope this helps :)
Sign In or Register to comment.