How do I set up a "home" button ?

Get help using Construct 2

Post » Mon Jun 06, 2016 9:31 am

Hi !
I'm working on my first project on construct 2, and i'm having trouble with my menu navigation. More precisely i have a problem with my "home" buttons. I have two of them, one in the pause menu that is in layout 1 and another in my game over screen in layout 2.
Image
Image

The problem I have is that only the "home" button from the pause menu does work, not the one on may game over screen. What i don't understand is that the actions are quiet the same, but for some reason it does not work. When you click on the home button from the game over screen, the game loads layout 1 but does not hide the"hud"layer and keeps the "menu" layer invisible.
I've been strugglin with this one from weeks, so i really need help or at least another point of view. PLEASE ! :cry: :cry: :cry:

Thank you !
*Hoping my english is clear enough ^^
B
6
Posts: 4
Reputation: 262

Post » Mon Jun 06, 2016 9:46 am

I think the action does not execute completely because you're going to layout 1 first. Has Layout 1 a different EventSheet?
B
19
S
6
G
2
Posts: 260
Reputation: 2,653

Post » Mon Jun 06, 2016 10:40 am

Nope they share the same eventSheet
B
6
Posts: 4
Reputation: 262

Post » Mon Jun 06, 2016 10:56 am

What happens if you disable the Menu visible and the Hud invisible actions? Or restart the layout action? (I mean both in your home button Event). I really don't have an idea but maybe with some test and changes you will have a clue.
B
19
S
6
G
2
Posts: 260
Reputation: 2,653

Post » Mon Jun 06, 2016 10:48 pm

OK i tried it but nothing changed, i've been tweeking all parameters but nothing seems to work. I tried to move the "go to layout 1" action, it did'nt change anythng eather. I have no idea of what's going wrong
B
6
Posts: 4
Reputation: 262

Post » Tue Jun 07, 2016 8:13 am

I've fixed it !!!
I've created a global variable to control the the visibility of each layer, so i could trigger it when ever i like.

My guess is that for some reason the chain of action for the home button event is too long (or complex ?) for construct 2 to execute it till the end. So i had to deal with the part that was not executed somewhere else in the code.

Thank you anyway for your concern Josek !
B
6
Posts: 4
Reputation: 262

Post » Tue Jun 07, 2016 9:26 am

rview wrote:I've fixed it !!!
I've created a global variable to control the the visibility of each layer, so i could trigger it when ever i like.

My guess is that for some reason the chain of action for the home button event is too long (or complex ?) for construct 2 to execute it till the end. So i had to deal with the part that was not executed somewhere else in the code.

Thank you anyway for your concern Josek !


Srry for not helping you at all :( Good job mate!
B
19
S
6
G
2
Posts: 260
Reputation: 2,653


Return to How do I....?

Who is online

Users browsing this forum: AnD4D and 21 guests