Signals between siblings

Godot Version

4.4.1

Question

I’ve got a Global Scene that has a function to “start” the card game I’m making, however, starting the game involves drawing multiple cards from the deck. How would I run the draw function from the deck by emitting a signal from Global, if the deck isn’t a child of the Global scene?
If there isn’t a way to do this, what’s a work around for connecting siblings via signals?

You can connect signals through code

func _ready() -> void:
    Global.start_game.connect(draw_cards)

func draw_cards() -> void:
    print("now with cards!")
3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.