Problem with the pause button

Get help using Construct 2

Post » Fri May 09, 2014 3:02 pm

I have a problem with the pause button. when the pause button is activated you will see several buttons, such as restart button, switch back to the level selection, and button settings.
when I touch the keys back to the level of choice and I get into the game again, but the pause button can not bring up a pop up (some key) is. what's the solution? thank you



SOLVED ^^
Last edited by 68tm on Sun May 11, 2014 1:55 am, edited 1 time in total.
B
6
S
1
Posts: 15
Reputation: 444

Post » Fri May 09, 2014 6:22 pm

That would be difficult to say without seeing the code and what you are doing. It would help if you uploaded an example of showed screenshots with what you are trying to do.
Kurieus
Come visit and play Blast Box!
B
15
S
3
Posts: 205
Reputation: 1,349

Post » Sat May 10, 2014 8:45 am

mepis wrote:That would be difficult to say without seeing the code and what you are doing. It would help if you uploaded an example of showed screenshots with what you are trying to do.


Solved,
and I have a new problem.
when I remove the button with opacity 0 or invisible, the button can still be in touch. I want the button can not be touched after hidden. Thank you. sorry bad english.
you can see the event sheet
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 15
Reputation: 444

Post » Sat May 10, 2014 11:23 am

Just add another condition to the touch events?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Sat May 10, 2014 11:29 am

Don't worry about your English. It's more than readable to get your message across. It's also far better than what someone could expect me to write in another language.

Perhaps it would be better to destroy the button and then recreate it when the game is paused? That, or you could add in a flag variable to check to see if it should respond to touch.
Such as:
if game is paused {
set isPaused =1
}

For level select button

if sprite is touched and isPaused equals 1 {
do your level select stuff
}

I think destroying and recreating the sprite would be more work, but it would also be more efficient on computer resources. Though we are only talking about one sprite here so it's not a big impact. Figured I would mention it nonetheless.
Kurieus
Come visit and play Blast Box!
B
15
S
3
Posts: 205
Reputation: 1,349

Post » Sat May 10, 2014 3:41 pm

At first i recommend use several layers. On first layer you can take in-game buttons. On second menu.
And in touch event add another condition button.visible or visibility of layer with this button.
B
10
S
1
Posts: 22
Reputation: 587

Post » Sat May 10, 2014 6:43 pm

all, i mean like this example. how to fix it? i won't these menu buttons are still can be touched during playing a game.
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 15
Reputation: 444

Post » Sun May 11, 2014 1:55 am

SOLVED.
THANK YOU ALL!! ^^
B
6
S
1
Posts: 15
Reputation: 444


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests