I'm trying to set it up so that there are three buttons but only one can be toggled at a time. So when one button gets toggled it makes sure that the other two are not toggled.
The code is trying to set the toggled status however since it can't find the node I'm at a loss.
var vec = Vector2(0,1000)
var ori = Vector2(0,0)
func _ready():
pass
func _on_Ally1_Button_toggled(button_pressed):
if button_pressed:
set_position(ori)
$Player_Button.set_pressed(false)
else:
set_position(vec)
This is what the tree looks like.
The Player_Ally1_ui
is trying to access Player_Button
but as stated it can't seem to find it and just returns null.
Any help is greatly appreciated, thank you in advance.