How do I create a pop up menu

Get help using Construct 2

Post » Fri Oct 03, 2014 3:42 am

Okay guys so you know how some games, when you die it has a pop up menu asking you if you want to be saved, to continue playing where you died from? I want to do that, that's it. If you can help it'd be really appreciated. Thanks so much! :mrgreen:
B
6
S
1
Posts: 89
Reputation: 619

Post » Fri Oct 03, 2014 3:49 am

Create a graphic for your pop-up/menu.
Set it in the location you would like it to appear.
Set it's initial visibility to disabled.
I assume your player already has a way of dying, correct? When your player dies, set the graphic to visible.

And that should be it.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Fri Oct 03, 2014 6:56 am

@Tekniko Thanks a bunch! Yeah I do already have a way for my character to die. Okay, I kind of wanting a movement of it popping up though like it comes from the bottom of the game into the game. Would I have to use the sine behaviour for that?
B
6
S
1
Posts: 89
Reputation: 619

Post » Fri Oct 03, 2014 7:14 am

Bullet behavior is probably best. You only want it to move in once and stay there. Sine is more for repeating movements.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Fri Oct 03, 2014 7:37 am

Alright thanks
B
6
S
1
Posts: 89
Reputation: 619

Post » Fri Oct 03, 2014 7:39 am

@Tekniko you explain things pretty well, another question so the pop up menu is mainly for a "save me" feature, so I'm using the fly along template right now I'm pretty far into it as graphics go, just working on the game play right now. So the save me feature is basically whenever the player dies, a pop up menu comes up and it says "Save Me!!" or whatever, and then the user can either decide to press it to save them or not after 5 seconds lets say the menu then disappears. How do I do this?
B
6
S
1
Posts: 89
Reputation: 619

Post » Fri Oct 03, 2014 8:26 am

That is a little more complicated, but first thing, take a look at the webstorage object:
https://www.scirra.com/manual/120/webstorage

1) Try to successfully save something (a number) with webstorage
2) Try to fetch it (where your load function will be)
3) Having succeeded with the above, now for the actual game save; save every coordinate for every sprite - and all other variables (number of lives, level etc.) in webstorage. Then fetch as you did in step 2; and then have an "if game loaded" event in your game event sheet, that spawns and places everything.

At least, that's how I'd do it - but I'm unsure if this is the best way.

Far more simple would be for the save feature to only be available between playing levels (if your game features several levels); then you only need to store a few things; number of lives, the current level and the current score.
B
12
S
2
Posts: 80
Reputation: 816

Post » Fri Oct 03, 2014 8:27 am

Tip for learning the basics of using webstorage:

Just follow this video tutorial:
https://www.scirra.com/tutorials/448/ar ... high-score

It's very easy, and I replicated what he did, without watching the video with sound.
B
12
S
2
Posts: 80
Reputation: 816


Return to How do I....?

Who is online

Users browsing this forum: AllanR, brunopalermo, PROxMTswatTR and 12 guests