End-Stage Layout

Get help using Construct 2

Post » Sun Mar 16, 2014 6:41 am

My game involves roughly a dozen "stages" within each "world" of which, there will be at least 10 in total. Going off that, I'm looking at a bare minimum of 120 layouts/stages. When the player completes a stage, I thought the best course of action (given the number of stages in the game) would be to change to a layout for the stage results (completed or failed). In addition, there will be four buttons:

Replay - restart the stage
Stage Select - change the layout to the respective world's stage select layout
Main Menu - change layout to the main menu
Next - change layout to the next level within the world and if no levels remain in the world, go to that world's stage select scene


With the stage select and next buttons....how could I code them so that they're contextual. In other words, if you're on stage 2-4, the next button should take you to 2-5 and the stage select button should take you to the world 2 stage select layout.

I can hard-code each and every condition and result into an event sheet, but not only will that be time-consuming, I'm not sure how badly that would degrade performance.

Thoughts?


Also, to keep track of the score for each stage, I was going to use an array, but again, without hard-coding what cell(s) to modify, I don't know how to be able to update the table contextually per stage completion.
B
3
Posts: 9
Reputation: 243

Post » Sun Mar 16, 2014 10:37 am

I always create a "Browse" Group with functions.
First I have a function like "startBrowsing". I set local variables like on which page I'm currently, what is the maximum page count etc.
I think you should make three variables:
World
Stage
Maximum Stages

Then I have a touch event when my browsing arrows are clicked.
In this event I first check in which direction I'm browsing. When I'm going to the right e.g., I add 1 to my page (or in your case to your stage).
You also need to check some things:
Did you reach maximum stage? -> Then maybe go the the next world
Did you reach minimum stage?-> Then go to the world before
Did you reach absolute minimum/maximum? Set one arrow invisible.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027


Return to How do I....?

Who is online

Users browsing this forum: Iquerno and 35 guests