I can't get signals with arguments to work properly. For whatever reason no matter what I do, the script that runs when it receives a signal does not use the argument at all. What am I doing wrong here?
Script for signal reciever:
func _on_character_body_3d_speech_message(text):
message(text)
func message(next_text):
hide_text()
$speech.text = next_text
$speech.visible_ratio = 0
await get_tree().create_timer(5).timeout
hide_text()
func _process(delta):
if $speech.visible_ratio < 1:
$speech.visible_ratio += len($speech.text) * READ_SPEED/100
Script for signal emitter:
if Input.is_action_just_pressed("jump") and is_on_floor():
velocity.y = JUMP_VELOCITY
speech_message.emit("I'm jumping!")
This code seems creates no errors or crashes, it just doesn't work.
(Additonal context: The recieving node is a Label, and the emitter is a parent of the Label. The hide text function simply clears the text, it doesn't actually hide anything)