How to write this with $ instead of get_node()?

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

I think this is not in the docs yet. So, how can I write this line get_node("/root/main/car").connect("armor_changed", self, "_on_armor_changed") with the $?

I have tried this way$root/main/car.connect("armor_changed", self, "_on_armor_changed")but is giving me an error.

note: car is a subnode of the main node.


:bust_in_silhouette: Reply From: hilfazer

Use “”

$“/root/main/car”.connect(“armor_changed”, self, “_on_armor_changed”)

Thanks man. The docs needs an update about this.

arthurZ | 2018-02-21 21:58