It is a little difficult to give suggestions here, as I don’t know the details of what you’ve implemented. But I’m going to guess that you have the sentence in a column in your conditions file, called, say,
Then you need two nested loops, one (the outer one) linked to your conditions file, which will run once per row of that file (i.e. once per sentence). The inner one will run once per word. The inner loop will run once per word.
The (slightly) tricky thing is telling this inner loop how many times to run. What you can do is count how many words there are in the sentence, and put that in the
nReps field of the inner loop, like this (where we split the sentence into its constituent words and count how many there are in the resulting list):
You don’t need to use most of the code in those previous posts for this task, as you don’t need to do any masking. Instead, we can simply split the sentence into words and just display each one on the each iteration of the inner loop. So insert a code competent, and in the “Begin routine” tab, put:
if your_inner_loop_name.thisN == 0: # only on the first iteration
sentence_list = sentence.split()
# this breaks your sentence's single string of characters into a list of individual
# words, e.g. 'The quick brown fox.' becomes ['The', 'quick', 'brown', 'fox.']
Then in the “text” field of your text stimulus, put this:
i.e. on each iteration of the inner loop, this will show the corresponding word from the sentence. No other code should be necessary, except for the suggestion above about making the wait period longer on the last iteration.