Problem with 'restart layout' and 'go to layout'

Get help using Construct 2

Post » Sun Nov 27, 2016 9:19 pm

On the start of the gameplay layout (the action layout) i have several groups deactivated, along with bullet and rotate behavior disabled. There is a 3,2,1 countdown and then everything gets activated and enabled.

If you touch PLAY from the main menu everything works fine.

But...if you touch replay from the leaderboards layout, which takes you back to the gameplay layout, the bullet behavior does not enable, so the disks move at 0 angle.

I've tried moving things around, waiting 0.25 secs, going to layout by name, many things. It just doesn't work if the layout is replayed.

If anyone has an idea on how to fix this, it'd be greatly appreciated.

CAPX
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

Post » Sun Nov 27, 2016 9:41 pm

Have you tried to just make so before the game starts, everything is ona timefreeze 0 and the player has to press a button to start the game?
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Sun Nov 27, 2016 9:50 pm

You need to reset things on Start of layout. Groups hold their state by design. Reset your bullets also.
ImageImageImage
B
71
S
22
G
257
Posts: 3,788
Reputation: 142,692

Post » Sun Nov 27, 2016 9:57 pm

@Triforce Tried the time scale, but there are some things i can't have included in that. Also, i'd rather have a countdown than a generic "push button to play". May have to revisit the time scale thing.

@blackhornet What do you mean by 'reset'? It works like it should except for the bullet behavior on the starting disks. And they are being enabled right after the action that activates the groups.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

Post » Sun Nov 27, 2016 10:17 pm

jeffige wrote:@Triforce Tried the time scale, but there are some things i can't have included in that. Also, i'd rather have a countdown than a generic "push button to play". May have to revisit the time scale thing.

@blackhornet What do you mean by 'reset'? It works like it should except for the bullet behavior on the starting disks. And they are being enabled right after the action that activates the groups.


There is a event that is

"ON start of layout -> Reset variables"
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Sun Nov 27, 2016 10:53 pm

You should always set your groups activation on startup.
ImageImageImage
B
71
S
22
G
257
Posts: 3,788
Reputation: 142,692

Post » Mon Nov 28, 2016 12:01 am

@Triforce

@blackhornet

Thank you for the help. I think i got it now. I added the timescale 0 action i was using for the gameover event(s) and had to move some actions up and down. Funny, i think its the same as i had it before.

At least its working now.


And if i can ever figure out this setting player name to array scores... I'll be golden



Thank you both again.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112


Return to How do I....?

Who is online

Users browsing this forum: dop2000, max2612 and 4 guests