Help with a pause menu

Get help using Construct 2

Post » Mon Nov 16, 2015 8:12 am

Excuse my bad English, use google translator to write this, because my English is not good (I can read English perfectly, but not write it).

Hello, my name is Sebastian, I am a college student, I'm currently creating an educational game as a university project.

My game has a pause menu, several submenus, items and selectable buttons (similar to the Zelda series).

Image

Menu structure:
Pause Menu (tiems)
> Exit Menu
> Trophy Menu
>> View Tropy

Each of these menus is in a different layer, these layers are invisible, and only become visible if the "esc" key is pressed (Pause Menu) or the predetermined button is pressed (the other menus).

The problem is this:

When these menus are invisible, still work, if the user clicks on the place where they should be one of the buttons, may accidentally select items, open other menus or even close the game.

To prevent this from happening, use the "Set layer Scale to 0" action when they were invisible and " Set layer Scale to 1.0" when they were visible.

At first (when I tried it with only 2 of the 4 menus) it worked without problems.

Image

But when finished adding the remaining menus, the game disappeared and there was only a blue screen.

Image

This problem only occurs when I add the "Set layer Scale to 0" action to the other two submenus.

Apparently the program does not support 4 layers that have the same action (Set Layer scale) enabled at the same time.

I'm desperate, I do not know how to make the layers and invisible elements do not interfere with the game.

Please help if anyone knows how to block invisible layers, it would greatly appreciate it.
B
3
Posts: 3
Reputation: 756

Post » Mon Nov 16, 2015 8:28 am

you can do:

if layer invisible + player clic on object "menu" > toggle disabled
if layer visible + player clic on object "menu" > toggle enabled
B
41
S
16
G
7
Posts: 1,750
Reputation: 9,963

Post » Mon Nov 16, 2015 9:14 am

it worked!!! :shock:

You do not know how long I've been trying to fix this.

Thank you very much :)
B
3
Posts: 3
Reputation: 756

Post » Mon Nov 16, 2015 10:51 am

XD :D
B
41
S
16
G
7
Posts: 1,750
Reputation: 9,963


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests