Hey. I have a problem to get the value of a key entry in my dictionary using a for loop to check all entrys.
onready var items = get_tree().get_nodes_in_group("item")
var vitem = {}
func _ready():
set_fixed_process(true)
func _fixed_process(delta):
for i in items:
var name = i.get_name()
vitem = {name:1}
for i in vitem:
if i.value() == 1: ####################################
print(i)
var pic = get_node("items"+str(i))
pic.set_pos(Vector2(0,0))
the line with the quotes doesn't work. i also tried vitem.i, but godot searches for a entry named "i" in the dictionary. does anybody know how to solve this?
thank you very much!