Hi all,
I’m using a loop in the builder to iterate over different images with different bounding boxes. I have the images and the bounding boxes properties set as “set every repeat” since these values are accessed from the condition excel file.
I’m trying to update the position of a polygon to move it where the mouse has been clicked, but with no success.
The code snippet is this:
elif mouse.getPressed()[0] and confirmed_position==False:
agreed_with_model.append(0)
confirmed_position_times.append(0)
rejected_position=True
button.opacity=0
trial_confirm.opacity=0
mouse_pos=mouse.getPos()
mouse_x=mouse_pos[0]*win.size[1]
mouse_y=mouse_pos[1]*win.size[1]
mouse_new=[mouse_x,mouse_y]
box.pos = mouse_new
box.setPos([mouse_x,mouse_y])
return time_remaining
I can change the properties of object that are set as “constant”, but not if they are set as “set every repeat” or “every frame”
I even tried to set the properties as “set every frame” and change the value of the variable used in the builder (e.g. the position uses the variable in the excel “placed_x, placed_y”, so I tried to change those variable in the code component), but with no success.
Can you help?
Thanks a lot