OS (e.g. Win10): Win10 PsychoPy version (e.g. 1.84.x): v2021.2.3 Standard Standalone? (y/n) If not then what?: y What are you trying to achieve?:
I want to customize the color of some of my stimulus (images).
Let’s say I have 10 images, I want to change the color of image # 1, 3, and 7 only.
The customized color change should be based on dialog box input (if there is a better place to insert this info, I am open).
What did you try to make it work?:
I customized my dialog box to include “color”.
In my conditions file, I created an additional column called “custom_color”.
I have 10 rows, one for each image.
“custom_color” is 1 if I want to change the corresponding image color, and 0 everywhere else.
I tried writing this code (Psychopy tells me it is incorrect syntax):
Thank you both! I’ve updated my code. I really appreciate your help.
Last question – my syntax still shows up as incorrect.
I think this is where my issue is:
I am trying to refer to a column in my conditions file.
For trials with a 1, I want to use dialogue box input, otherwise I put a 0 since I want to use my default values.
Could you point to the correct way to refer to conditions files variables? I’ve tried $color_variable (with a $sign) but I don’t think that’s it. I’ve tried butting the color_variable on the leftmost, in case it conditions files reads sequentially left to right.
Thank you so much! The problem has been resolved.
I just had the “wrong” apostrophe, and it was giving me an error.
For anyone else that comes to this page: all number values are integers in the conditions file, Psychopy automatically only looks at one row (or one trial) at a time. But copying and pasting code from this forum somehow gives you the incorrect apostrophe.
And