Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | freakcoco |
I want to use a signal with arguments in godot v3.1.1 .
Something like this:
signal my_signal(arg: int)
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | freakcoco |
I want to use a signal with arguments in godot v3.1.1 .
Something like this:
signal my_signal(arg: int)
Reply From: | MallNinjaMax |
extends Node
signal my_signal
var number: int = 10
var stringy: String = "Yo"
func _ready():
connect("my_signal", self, "_testing")
emit_signal("my_signal", number, stringy)
func _testing (num: int, texty: String): # <--- Here, in the custom method
print(str(num) + " " + texty)
Reply From: | Dlean Jeans |
It’s not possible, yet. Although, it may be added in 3.2.
See this issue on GitHub.