Godot(3.3.3) in code how do i connect a signal

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Richard_A_Odell

ok here goes

Test_level-1
portals( child CyanPortal)

HUD
COINS
Bananas(child banana1)

CyanPortal
Area-2D
Sprite
CollisonShape 2D

banana1 has a signal
banana_collected
when i walk thru CyanPortal it loads HUD1

so how do i connect banana_collected to HUD1

please put code here

You already asked this question and it was answered for you Please please i need help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - Archive - Godot Forum

Gluon | 2022-11-27 12:06

:bust_in_silhouette: Reply From: SteveSmith
banana1.connect("banana_collected", HUD1, "_on_banana_connected")

HUD1 might be “self” if calling this from inside HUD1.