How do I create a settings menu?

Get help using Construct 2

Post » Sat Jun 14, 2014 10:48 am

I cannot create a settings menu for my platform game.
I need your support! Shape Swapper isn't complete without Bitcoin donations. Donate --->1QETAa8Z2swZ1sHZRbSk4mv5MvpUTi1wEi
B
9
S
3
Posts: 40
Reputation: 868

Post » Tue Jun 17, 2014 1:48 pm

coud you be more spesific?
what kind of options do you need?
B
5
Posts: 24
Reputation: 271

Post » Thu Jun 19, 2014 8:53 am

helekopeter wrote:coud you be more spesific?
what kind of options do you need?


It is turning off music. (Note: it must work around the game.)
I need your support! Shape Swapper isn't complete without Bitcoin donations. Donate --->1QETAa8Z2swZ1sHZRbSk4mv5MvpUTi1wEi
B
9
S
3
Posts: 40
Reputation: 868

Post » Thu Jun 19, 2014 8:56 am

Create a global variable and set it to either true or false. In you eventsheet, for each event that would trigger a sound add a condition to only play it when that global variable is true.

Done
B
44
S
10
G
8
Posts: 437
Reputation: 6,463

Post » Thu Jun 19, 2014 9:10 am

Ubivis wrote:Create a global variable and set it to either true or false. In you eventsheet, for each event that would trigger a sound add a condition to only play it when that global variable is true.

Done

What events are needed?
I need your support! Shape Swapper isn't complete without Bitcoin donations. Donate --->1QETAa8Z2swZ1sHZRbSk4mv5MvpUTi1wEi
B
9
S
3
Posts: 40
Reputation: 868

Post » Thu Jun 19, 2014 9:48 am

I guess you have an audio object placed on your layout and whenever you need to play a sound you call an event to play a sound file.

At these events, you need to add a condition to check your global variable if it is true or false.

On your setting page, you need to add an object with which your can interact.
For example:
You have a sprite of a square with is either checked or not (checked = playing sound; unchecked = sounds disabled).
When you click on that sprite, set your global variable either to true or false depending on what you need (like, if it is unchecked and you click on it, set the variable to true and change the sprite to show the checked image).

Hope this helps you to understand how variables are working and what you can do with events. If not, I would suggest to have a read of the C2 Manual first, as these functions are the basics for any game that you create with C2.
B
44
S
10
G
8
Posts: 437
Reputation: 6,463

Post » Thu Jun 19, 2014 9:52 am

Ubivis wrote:I guess you have an audio object placed on your layout and whenever you need to play a sound you call an event to play a sound file.

At these events, you need to add a condition to check your global variable if it is true or false.

On your setting page, you need to add an object with which your can interact.
For example:
You have a sprite of a square with is either checked or not (checked = playing sound; unchecked = sounds disabled).
When you click on that sprite, set your global variable either to true or false depending on what you need (like, if it is unchecked and you click on it, set the variable to true and change the sprite to show the checked image).

Hope this helps you to understand how variables are working and what you can do with events. If not, I would suggest to have a read of the C2 Manual first, as these functions are the basics for any game that you create with C2.

What is the global variable required?
I need your support! Shape Swapper isn't complete without Bitcoin donations. Donate --->1QETAa8Z2swZ1sHZRbSk4mv5MvpUTi1wEi
B
9
S
3
Posts: 40
Reputation: 868

Post » Thu Jun 19, 2014 5:01 pm

If you could read the manuals more or just search around the How do I and tutorial forums, you could get answers for lot of your questions mate!!!

If you don't get answers from there or if it is confusing for you then post a question mostly with wip capx.
Image
B
31
S
7
Posts: 197
Reputation: 2,497


Return to How do I....?

Who is online

Users browsing this forum: georeb, part12studios and 10 guests