#How do I export nodes In Godot 4?

7 messages · Page 1 of 1 (latest)

bitter patrol
#

Hmm...lemme see if I got this right. The ones with the @export annotation is the Spell Select Menu, right?

#

Did you create a variable that reference the nodes paths for the Metronome and Spell Screen?

#

Like:

@onready var metronome := get_node("SpellTestingScene/Metronome")
gaunt glen
#

Thank you for responding! Where would the code you're suggesting go since the Spell Select Screen doesn't know about the Spell Testing Screen?

#

This is the error I'm getting when I run it:
Invalid assignment of property or key 'wait_time' with value of type 'float' on a base object of type 'Nil'.

The beat variable is a child timer to the metronome, and current_bpm is an enum that's preset in the script.

This is the function it happens at:

    current_bpm = new_bpm
    # TODO: Change back to 60. The divison is by seconds.
    beat.wait_time = 30.0 / float(current_bpm)```
bitter patrol
#

??? Wait, is this in a new script?

gaunt glen
#

This is the script that it's pointing me to when it crashes!