I have noob question about menus :)

Get help using Construct 2

Post » Tue Nov 04, 2014 10:34 am

Hi :) Im guessing this would be an easy question for some of you construct wizards out there. I wanna make an easy menu that comes up when I die...I was looking for more tutorials on this, but decided to make my own post in hopes that someone will post a .capx so I can understand it better, I want it to look something like this...

plonga.com/skill/Reaction/Flappy-Bird-Online/

or

angrybirdsgames.com/games/angry-birds-space

So as you can see I want to learn how to make a menu that show up right there and then when I die that can have a reset button, or a save me button..ect..

Thanks in Advanced :D :) :)
B
8
S
2
Posts: 56
Reputation: 677

Post » Tue Nov 04, 2014 10:52 am

Basically, all menus come down to this.

a) Stop or pause the game when the trigger for the menu comes out
b) Run the correct event based on what the player presses next

So to stop the game, once your trigger has occurred, from the above example, When Bird collides with enemy, either use the set time scale to 0, or set your variable if you are using a variable to control when your game events should run. Next just create the sprites for the menu and buttons at the location you want them to be.

As for going back to the main menu or resetting the game, use the go to layout action and the restart layout actions. As for a resume button, just delete all the menu sprites, and set the time scale back to 1 or your variable to the appropriate setting.
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Tue Nov 04, 2014 11:12 am

Hey! thank you for that, you're officially a master in my books aha, well said, since I'm up and hopefully so are you , how would I go about doing some menu effects? well just 2 effects in particular actually :)For example Have the menu slide in..or slide up..something along those lines..and how do I scale the buttons when I hover or press it?
B
8
S
2
Posts: 56
Reputation: 677

Post » Tue Nov 04, 2014 1:26 pm

For sliding, to get the smoothest results, you can use lerp. If you are a total beginner, lerp might be slightly complicated, but it is super useful. Or you could use the litetween behavior. https://www.scirra.com/forum/viewtopic.php?f=153&t=70700&hilit=lite+tween+litetween

As for the scale, you can set the scale of the sprite in the actions section, or actually create two different sprites for that button, than when you hover or press it, set it to the other animation frame.
B
46
S
23
G
31
Posts: 693
Reputation: 20,637


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, ignaciosimo, nickar and 39 guests