Load saved game, but don't go to saved layout

Get help using Construct 2

Post » Wed Feb 26, 2014 5:04 am

I tried a few different ways, but my saved game keeps bringing me to the layout, where I don't want to be... is there a way to force, after the game has loaded from it's saved state, to go to a specific layout, without the one that was saved to load?

I have a players name, that after they enter it on the character customize screen, that it saves it... but when the game starts, it loads any saved name. Problem with this is, that it goes to the character customize screen instead of the Title.

I'm sure this is an easy one... I really have to stop staying up so late.
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Wed Feb 26, 2014 5:36 am

What I do is create a condition on LoadComplete > Got To Layout

In my case the layout I go to is the level select layout.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,573

Post » Wed Feb 26, 2014 6:00 am

BluePhaze wrote:What I do is create a condition on LoadComplete > Got To Layout

In my case the layout I go to is the level select layout.


I tried that; however in my experience, it never launches the condition "LoadComplete"... it just goes right to the layout that the Load State called.
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Wed Feb 26, 2014 7:35 am

Did you try:

Let's say there is a button called "Load Game".
On Load Game clicked > Load Game
Go to Layout

Or use variables:
Load (check if game already loaded) = 0
On Load Game clicked > Load Game
Load = 1
If Load = 1 > Go to Layout
Load = 0

I didn't try it, but I'm going to do in a few minutes.
I hope I could help you.
B
4
G
1
Posts: 25
Reputation: 373

Post » Wed Feb 26, 2014 3:52 pm

EliasGames wrote:Did you try:

Let's say there is a button called "Load Game".
On Load Game clicked > Load Game
Go to Layout

Or use variables:
Load (check if game already loaded) = 0
On Load Game clicked > Load Game
Load = 1
If Load = 1 > Go to Layout
Load = 0

I didn't try it, but I'm going to do in a few minutes.
I hope I could help you.


Yup, tried that. Right after it does the "Load game" action, it goes to the other layout, and ignores the next condition. makes no sense.
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Wed Feb 26, 2014 5:10 pm

Add a variable when saving
On save condition add variable saved=trueat begging of each layouy if svaed=true go to a specific layout.
B
28
S
10
G
10
Posts: 96
Reputation: 6,582

Post » Wed Feb 26, 2014 8:20 pm

makotto wrote:Add a variable when saving
On save condition add variable saved=trueat begging of each layouy if svaed=true go to a specific layout.


That's actually what I ended up doing... but I'm still left with the initial problem of the level loading, and then skipping back to the beginning after loading that level... sometimes you hear music playing... sometimes you see stuff on the screen; I wanted to avoid that.
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Wed Feb 26, 2014 8:49 pm

A simple solution would be to add a loading screen, on a front layer set to white and background visible, in each layout.
In a separate event sheet, store the global sound level in a variable and then set it to -80dB to cut the sound.
Add in this event sheet a function "EndLoading", that will restore the sound level, and hide the front white layer (or image you put in)
Include this sheet in every principal event sheet of your layouts, and add a call to the function "EndLoading" once you handled the change of layout on Load of a savestate.
B
17
S
8
G
4
Posts: 461
Reputation: 6,137

Post » Wed Feb 26, 2014 10:07 pm

Guizmus wrote:A simple solution would be to add a loading screen, on a front layer set to white and background visible, in each layout.
In a separate event sheet, store the global sound level in a variable and then set it to -80dB to cut the sound.
Add in this event sheet a function "EndLoading", that will restore the sound level, and hide the front white layer (or image you put in)
Include this sheet in every principal event sheet of your layouts, and add a call to the function "EndLoading" once you handled the change of layout on Load of a savestate.


I can't believe there's not an easier way.
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Thu Feb 27, 2014 7:55 am

Nitro187 wrote:
EliasGames wrote:Did you try:

Let's say there is a button called "Load Game".
On Load Game clicked > Load Game
Go to Layout

Or use variables:
Load (check if game already loaded) = 0
On Load Game clicked > Load Game
Load = 1
If Load = 1 > Go to Layout
Load = 0

I didn't try it, but I'm going to do in a few minutes.
I hope I could help you.


Yup, tried that. Right after it does the "Load game" action, it goes to the other layout, and ignores the next condition. makes no sense.


Try:
If load = 1 > Goto Layout
Load = 0
But do this in the Layout wich loads after loading the game
I'm trying that now and tell you if it works.

Edit: Didn't work. Sorry :(
B
4
G
1
Posts: 25
Reputation: 373

Next

Return to How do I....?

Who is online

Users browsing this forum: totoe, wizdigitech and 14 guests