Pause Menu

Get help using Construct 2

Post » Tue Jun 04, 2013 4:13 pm

Hi, I'm new here.
Can someone teach me how to do the Pause Menu like :
http://cdn.androidtapp.com/wp-content/uploads/2012/03/Train-Conductor-2-Pause-menu.png
B
3
Posts: 3
Reputation: 181

Post » Tue Jun 04, 2013 4:25 pm

The tutorial [/url=http://www.scirra.com/tutorials/67/delta-time-and-framerate-independence]delta-time and framerate independence[/url] covers pausing.
Scirra Founder
B
378
S
220
G
84
Posts: 23,868
Reputation: 188,109

Post » Tue Jun 04, 2013 4:28 pm

Well it's just a matter of stopping everything that is going on. Then putting it all back in motion when you unpause.

There is a pause plugin in the plugin forums you can try, but I will usually just do it manually. Putting code in Groups can help with this, for example if all of your controls are in a group, when you pause you can deactivate that group.
B
100
S
31
G
11
Posts: 1,552
Reputation: 21,497

Post » Tue Jun 04, 2013 4:30 pm

Thanks..but I need to know how to popup the menu..
Can you give me example?
B
3
Posts: 3
Reputation: 181

Post » Wed Jun 05, 2013 3:37 pm

Anyone can help how to popup Pause Menu?

My idea is :
Layer1 = Main
Layer2 = Pause Menu

Button clicked->Layer1 deactive -->Layer2 active

Is it OK?
How to use new layout as Pause Menu?
B
3
Posts: 3
Reputation: 181

Post » Wed Jun 05, 2013 5:22 pm

I think it would go kinda like this:

1) If Pause == true, stop everything on screen (using Ashley's tutorial above)
2) Spawn the pause sprites somewhere you want on the screen.
3) If press resume, set pause to false and undo everything above.

Not that hard I guess.
B
52
S
10
G
6
Posts: 133
Reputation: 8,755

Post » Wed Jun 05, 2013 5:28 pm

You know, you should try the help people give you, especially when they are the developers of the program you are using.
Just read this, as Ashley suggested.
[QUOTE=Tutorial linked before]Timescaling
A really cool feature in Construct 2 is timescaling. This allows you to change the rate time passes at in the game, also known as the time scale. You can set the time scale with the system Set Time Scale action. A time scale of 1 means normal speed. 0.5 means half as fast, and 2.0 means twice as fast. If you set your game's time scale to 0.1, it's going ten times slower but still smoothly - a nice slow-motion effect!

Timescaling works by changing the value returned by dt. This means behaviors are affected, and any movement using dt. If you don't use dt in your movement calculations (like the first event above) the motion is not affected by the time scale! So to use time scaling, you simply have to use dt properly in all movement.
Pausing
You can set the time scale to 0. This stops all motion. It's an easy way to pause the game. Set it back to 1 and the game will resume.[/QUOTE]
B
17
S
8
G
4
Posts: 461
Reputation: 6,077


Return to How do I....?

Who is online

Users browsing this forum: alextro, christina, Kyatric, omnipaws, ThePlagueDoctor and 7 guests