OS: Win 10
Standard Standalone: yes
I’m trying to develop a task in which a number is presented onscreen, and participants have to make a judgement about it (e.g. odd or even?) and press a response key. Once they press the key, the number should be replaced by a new (randomly drawn) number, and so on. This should continue for a pre-determined amount of time (e.g. 5 seconds), no matter how many responses they make. Ideally this should all be enclosed within one routine.
So far I have a simple routine set up with a code segment
code, a text stim
number, and a key press
resp_1, shown below. Note that the Text field of
number is defined as
$rand_value, and it has a duration of 5.0 seconds. Also note that Force end of Routine is unchecked in
EDIT: I have changed
number to “set every frame” instead of “set every repeat”
The Begin Routine tab of
code contains a line which generates a random value to be shown onscreen at the start of the trial.
In the Each Frame tab, I used the following to try and reset
rand_value following each button press
This doesn’t cause any errors, but the first generated number (I assume from the Begin Routine tab) simply displays onscreen for 5 s and does not change, regardless of key presses. I need it to change with every key press, but I can’t figure out how to do that.
Any advice would be greatly appreciated!