HOW DO I GET AND SET A NODES PROPERTIES?????

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

So i’ve got this pinJoint node that has the properties node_A and node_B. My question is how can i get and set those properties???

:bust_in_silhouette: Reply From: usurun

variables inside nodeA, value_a = 10 value_b = 200.0
inside nodeB, get_node("node_path").value_a = 30

var target_node = get_node("node_path")
target_node.value_b = 300.0

you can also add setget to a variable

var something = 20 setget something_func
func something_func():
    something = value
    return