set type of signal variable

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

i can’t do this

signal my_signal(value: float)

Yep, you can’t.
You can check the value’s type with, for ex. if typeof(value) == TYPE_ARRAY: before sending or after receiving the signal

1shevelov | 2021-09-27 13:22

:bust_in_silhouette: Reply From: Wakatta

Try doing this

func _my_signal_func(value: float):

But when you go to the signal window, you can see that the parameters of other signals have the type

Timofey | 2021-09-28 13:14