How do I Create Multiple Levels

Get help using Construct 2

Post » Fri Dec 12, 2014 10:10 pm

Hey Guys could really use some help in figuring out what my problem is... I have a simple concept platformer taking shape and the problem i'm having is moving from level to level... when building the second level or third or fourth do I need to bring a copy of the player into each level cause for some reason what's happening to me is when player enters the bouns level that has a timer when hits zero brings player back to level 1 ( tried to simply use a VAR to hold boolean that toggles if he came from bonus round or not ) if from_bonus = true go to level one and set players position to where the bonus triggered... then I toggle from_bonus = false... but I'm getting two players now spawning one above the other...
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Fri Dec 12, 2014 11:22 pm

Is your player's Global property set to true? That would allow it to stay present from layout to layout.
If you're getting multiple players, perhaps you have an event somewhere that is being called which creates a new player- if so, you should make a condition for it that checks whether a player exists or not before creating one. One way to check if a player exists is to compare two variables, and then use player.Count > 0..
B
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

Post » Sat Dec 13, 2014 1:48 pm

I'll have a peek at the code again but question for you on the second level do I drop a toon in there or just create the layout and when system--> go to layout happens the player ports to the new layout?????
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Sat Dec 13, 2014 6:07 pm

drop a toon? I'm not sure what you mean by that.
You just need one player in one layout, and if it's Global property is set to True, it will carry over to any layout you switch to. If you put other players in other layouts, then you'll end up having multiple players.
B
41
S
19
G
65
Posts: 1,085
Reputation: 37,842



Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], newt and 10 guests