Hi,
I encountered a problem after using an audio player node. Theres an Area that emits a signal thats connected to the audio player node, but it isnt generic. Each time i create an audio node i have to make another area and another signal and another script … how do you make the area signal connect to the audio players handling function from either a script on the area or a script on the audio player?
Damn, forgot not to ask stupid questions.
func _ready():
var timer = get_node("Timer")
timer.timeout.connect(_on_timer_timeout)
The timer could be the area … so its a function
(Note: this isnt easy to write on the phone)
First an export @export var area
then
func _ready():
area.body_entered.connect(play_sound)
That will work if the body_entered signal was correct
And the func …
func play_sound():
self.play()
Sorry to bother you with questions that i already should know the answer to but people do get tired and it seems that most forums were typically a place to learn so that is a good example of how to do that.