Help
Asked Answered
A

15

0

Hello, please tell me how to fix it. I wanted the music to turn off when the button was pressed and also turn on when pressed.

Aker answered 15/11, 2023 at 23:48 Comment(0)
P
0

Aker else must be vertically aligned with if.

Philpot answered 15/11, 2023 at 23:50 Comment(0)
A
0

Philpot I keep getting new errors no matter how I try to align the text.

Aker answered 16/11, 2023 at 0:0 Comment(0)
P
0

Aker Well, you should address each error, see what error message says and try to find what's causing it.

Philpot answered 16/11, 2023 at 0:17 Comment(0)
A
0

I've already had chatGPT4 rewrite the code anyway error

Aker answered 16/11, 2023 at 0:27 Comment(0)
P
0

Aker Try to put the dollar sign in front of back_music

Philpot answered 16/11, 2023 at 1:35 Comment(0)
S
0

Aker For various reasons don't rely on ChatGPT.

And as xyz already said back_music needs to be renamed to $back_music in your code because you want to access the node in your scene and not a variable in your script.

Shiftless answered 16/11, 2023 at 7:18 Comment(0)
A
0

Thanks, after I put the $ sign in front of back_music, the errors disappeared. But the music off/on button still doesn't work.

Aker answered 16/11, 2023 at 8:39 Comment(0)
S
0

Aker Is your button “pressed” signal correctly connected? Also looks like there are a lot of other errors.

Shiftless answered 16/11, 2023 at 9:14 Comment(0)
A
0

Shiftless when I click on the button, the following appears

Aker answered 16/11, 2023 at 10:21 Comment(0)
A
0

Shiftless There is no connected method '_on_texture_button_pressed' for the 'pressed' signal from the 'menu/TextureButton' node to the 'menu/TextureButton_Music' node.

Aker answered 16/11, 2023 at 10:30 Comment(0)
S
0

Aker Rename the function in your code to the one in the error message.

Shiftless answered 16/11, 2023 at 10:54 Comment(0)
S
0

Aker What was your introduction to Godot? Did you watch tutorials or read the documentation?

If you haven’t already then read the “Getting Started” chapter in the manual. You can skim it at first and re-read it later but make sure to do the two “your first game” tutorials as they will teach you the basics and they are a great place to start.

https://docs.godotengine.org/en/latest/getting_started/introduction/index.html

Shiftless answered 16/11, 2023 at 10:59 Comment(0)
A
0

Shiftless Please help me with my other question. He's in my profile.

Aker answered 16/11, 2023 at 18:40 Comment(0)
S
0

Aker What other question?

Shiftless answered 16/11, 2023 at 18:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.