Hi all,
I am attempting to make a seemingly simple pin entry task, but am running into problems in regards to having the computer check for the correct pin. I can only include 2 media in this post since I am new to psychopy forum and will include a data file and the experiment itself. I will reply to this post with some screenshots of my code as well.
The gist of what I want participants to do is to receive a pin, and then they have to click the pin digits(numbered polygons with a mouse component) in the order they were shown to advance, however I keep getting an incorrect feedback.
So basically what I am doing with code is generating a random number at the start of a loop and calling it Pin. Then I break Pin up into 4 separate str values in the order that it was displayed. The idea is to have a desired_order variable, which is equal to Pin, and is what the computer is checking for in regards to the order of clicked buttons ( numbered polygons with clickable attributes). With my broken up Pin I then assign each str value (1, 2, 3, etc) to the end of polygon. This creates a order that looks something like this: polygon1, polygon2, polygon3 etc. I have my “buttons” named as each respective polygon. However when I run this I always get an incorrect feedback. I do not receive any error messages and when I look at the data, the desired_order variable is equivalent to the order of the buttons that should be pressed. In other words this seems as if it should work, but it is not. I am still fairly new to psychopy and coding so any help would be greatly appreciated! Thank you!
781270_custom_button_order_2024-07-19_11h52.43.759.csv (2.8 KB)
Updated button order.psyexp (91.2 KB)