If condition and then action

Can you make me owner of the game? All you have to do is open the “game.json” file on GDevelop and go to home section in gdevelop again and press three dots on the project and click manage game. Once you done that click “edit game details” then find Owners and put in Luminity and click the name. Lastly click save

(Optional) Click unregister game

Ok I got you on there.

It didn’t let me take my name off the owner, but it let me put yours on there too and it said owners can take names off. So I imagine you can take my name off, it just wasn’t letting me do it because then I wouldn’t have permission to make those edits.

These examples are AMAZING! Just one thing, my levels are different scenes and Idk. Is the layout for the settings or…? Am I supposed to preview the second scene because the first one just shows the layout?

P.S This was meant to be posted ages ago but I forgot to post it

The layout is just a global object toggle button, fake toggle button, and some arrow buttons to change scene, set on a UI layer. Each scene has a UI layer. I just do that so the buttons are in the same position every scene. You don’t have to do that, you can just manually drag the toggle button into each scene and set it to 1030, 30 in the instance properties (or wherever you have it).

The second scene you can preview to when you click an arrow button in the first scene

I don’t see the arrows in the scene. Do I have to drag them in?

They’re not in the scene in the editor, they’re in an external layout and only get put in the scene when the game is running. But you can put them in the scene instead if you want to.

That’s what it looks like running.

What is faketoggleswitch for?

Faketoggleswitch is a sprite of the toggle switch in the off position. It sits on top of toggleswitch and has a higher zorder than toggle switch. It is only visible if global bool MusicOff is true at beg of scene and stays visible until the user interacts with the toggleswitch. It is there so that if the player has the music off and switches scenes, they do not have to endure the annoying flickering of the toggleswitch being set to unchecked at the beginning in the new scene.

I need help with the toggle switches! How do I make it where only one of them is the on animation and the false one is only off animation. Please provide maybe a video of you doing this.

Ok I’ll see what I can do when I get home. But if it’s just because you want to use a different image for the toggle switches you can check if you can go into the toggle switch object and place your own off and on image there. And your own off image in the fake one.

IT WORKED!!! No need for the example, I have figured it out and now this isn’t an issue.

1 Like

Wow way to go, great job!

@Lucky-j Hey, when I fixed it where the music stops on pause menu but when leaving the pause menu it stops. The pause menu is a layer as well so… Also, I want the music to play automatically when launching the game and if turned off on settings it’s turned off on title screen instead of playing music every time title screen launches when music toggle is off.

Also, I want to do the sound toggle. I did the same thing as music but the sound won’t stop. I put the sound on channel 2 and stuff won’t work.

So are you saying your pause menu is on another layer in the same scene? You will have to make a rule like, player is in the pause menu, sound is playing on channel w/e, pause sound, player clicks x to close pause menu, sound is paused on channel w/e, unpause sound.

Unless you save the state of the sound and load it when the player starts the new game, it should always play when launching the game, with the exception that in some cases the player has to interact with the screen first. So make a fake loading screen with a play button for them to press. If you mean while playing the game the user can go to the start screen and the music will play even if they have it selected to off, then just don’t include any music off rules in that scene. Just put sound is not playing on channel w/e, play sound on channel.

Show the events I can check what’s up.

ok, can you show examples if possible. I will show events




I have disabled the sound thing until I get that fixed so yeah

For the pause menu, see where you have Resume the sound on channel 1 when The bool of scene var Paused is false? But in the Pause menu you say pause the music, not sound. In fact all the reference I see to channel 1 has it as music.

Yes, the reason it is music is because the sound one made it bass boosted so yeah. It fixed the bass boost when switched to music

Ok so there is no sound for it to resume on channel 1. Try resuming playing music on channel 1 instead.

Ok, it works but when turning off the music in settings and pausing it and closing the pause menu it plays the music. How to fix this

See in that whole sub block you have it in? Where the condition is trigger once? You can make a new event right under that sub block and line it up with the block that says trigger once. Give that block a condition that says Global var musicOff is False, then pull down the resume into it and see if that works.