How do you unlock levels? My method doesn’t work.
ShaunElery
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?
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
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.
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!
Hope this helps