How do I fix level selection unlock

Get help using Construct 2

Post » Thu Apr 30, 2015 12:47 am

Hi all,

I have a bit of an issue. I'm trying to set up level selection with unlocks. I got the images to appear correct but after I complete level 1 it just loops back to level 1 instead of going to the next level to unlock. I have my variables set up basically if score = 200 go to next level. then if score = 400 go to next level etc... If any one can help point what I'm missing I would be a very happy person!!

Capx for reference
http://1drv.ms/1aCBjD3
B
57
S
10
Posts: 22
Reputation: 2,656

Post » Thu Apr 30, 2015 1:14 am

You've got level2event including Genercode which includes level1event which has an "On startup" that resets everything. Move most of your events out of level 1 to Genercode, and things should be happier.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Thu Apr 30, 2015 1:33 am

Hi Blackhornet,

When I moved my events out of level 1 after i reach a score of 200 it looks like it goes to the next level but the player doesnt move and nothing else happens
B
57
S
10
Posts: 22
Reputation: 2,656

Post » Thu Apr 30, 2015 1:57 am

Repost CAPX.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Thu Apr 30, 2015 2:04 am

B
57
S
10
Posts: 22
Reputation: 2,656

Post » Thu Apr 30, 2015 2:29 am

You didn't move the events, you just removed the genercode link. Move everything out of level1event that doesn't relate to level1, put it in genercode, then include genercode back into level1events. You want all of the code needed for all levels in one file, and only the specific level events in each of their related eventsheets.

Alternately you can do it all in one eventsheet but break out the specific events based on the "currentlevel" variable, which you already have.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Thu Apr 30, 2015 2:44 am

Awesome! That worked now I just need to clean it up a bit. Thanks alot blackhornet!!!
B
57
S
10
Posts: 22
Reputation: 2,656


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests