How to set a color with a variable?
Hi
I'm trying to change the color of the fixation point once the monkey starts fixating. However, if I try to set the color of the fixation_point stimulus to a variable, I always get
00:22:59: ERROR: Failed to create object.
Extended information:
reason: Invalid color string: fp_color
object_type: stimulus/fixation_point
ref_id: idm331356721344
component: fixation_point
parser_context: mw_create
I have tried string and list types for the fp_color variable.
Is it possible to set the color with a variable?
Best,
Joscha
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Christopher Sta... on 22 Jul, 2016 01:49 PM
Hi Joscha,
You need a separate variable for each color component. For example:
If you want to change the color without dequeueing and re-queueing the fixation point, you'll need to live-queue the stimulus (with
live_queue_stimulus
) and then invokeupdate_stimulus_display
when fixation begins (to force the stimulus to redraw itself).Cheers,
Chris
Christopher Stawarz closed this discussion on 08 Aug, 2016 05:22 PM.