#Coding Subtitles

15 messages · Page 1 of 1 (latest)

neat monolith
#

I'm trying to add an option to toggle subtitles, and the code I'm using is in the first screenshot, but when I click on the check button, the game crashes and I get the errors in the other two screenshots.

neat monolith
#

(just gonna bump this)

shell finch
#

Try changing state_label.text = "Text" to state_label.set_text("Text")

#

@neat monolith

neat monolith
twin tulip
#

@neat monolith you are not getting the label node correctly, which is what its telling you with that 'null instance' thing.

#

Something about your node paths is wrong.

neat monolith
twin tulip
#

Can you show the node structure under subtitles toggle @neat monolith

#

this is looking for a label at SubtitlesToggle/HBoxContainer/State_Label, and one of your errors is telling you explicitly that there is no such node.

twin tulip
#

There doesn't seem to be a State_Label unless its cut off.

neat monolith
#

Turns out all I needed to do was rename it.

#

🫠

twin tulip
#

There you go 🙂