Godot Version
4.3rc3
Question
i think i want to know the data type for an event?
My goal: My tutorial is 24 steps - wait for button press, wait for item built, wait for person to die, etc. i think i want to use a state machine with one class per state. Each class waits for one or more events. i want to generically pass in the events to wait for (if that’s possible).
@export var wait_for: signal [doesn't work]
func enter():
wait_for.connect(on_wait_finished)
func on_wait_finished():
emit_signal("finished")
My approach is possibly quite stupid but i’m not sure how else to handle this in a general purpose way.
Example Tutorial:
- Wait for “press start button” (
start_button::pressed
) - Wait for “wave ended” (
Level::wave_ended
) - Wait for “select a tower” (
red_tower::pressed
) - Wait for “place tower” (
Level::tower_built
)