Millisecond Forums

stimuli appearing after some seconds from block start and stay till the end of the block

https://forums.millisecond.com/Topic32488.aspx

By Athanasia - 11/22/2021

For my experiment, a block starts with a 2-second countdown, then 5s fixation on a cross and then a set of 24 trials that have emotion words appearing on each side of the screen for all these trials till the end of the block. In previous experiment these words appeared in the beginning of the block and stayed till the end with /bgstim attibute. However now, I would like this words to appear not at the very beginning, but AFTER the 5s fixation and stay till the end of the block.
How should I do that?
Thank you in advance for your help.
By Dave - 11/22/2021

Athanasia - 11/22/2021
For my experiment, a block starts with a 2-second countdown, then 5s fixation on a cross and then a set of 24 trials that have emotion words appearing on each side of the screen for all these trials till the end of the block. In previous experiment these words appeared in the beginning of the block and stayed till the end with /bgstim attibute. However now, I would like this words to appear not at the very beginning, but AFTER the 5s fixation and stay till the end of the block.
How should I do that?
Thank you in advance for your help.

Move the respective <text> elements from /bgstim to the respective <trial> elements' /stimulustimes or -frames, and set their /erase attributes to false.
By Athanasia - 11/22/2021

thank you very much. I would like to have your opinion also in that:
the position of these words should change BETWEEN participants according to their participant number (odd number: word DISGUST on the left and word FEAR on the right - even number: word FEAR on the left and word DISGUST on the right).
I created this:
...
<text disgust_left>
/ items = ("DISGUST")
/ position = (10,50)
/ erase = false
</text>

<text disgust_right>
/ items = ("DISGUST")
/ position = (90,50)
/ erase = false
</text>

<text fear_left>
/ items = ("FEAR")
/ position = (10,50)
/ erase = false
</text>

<text fear_right>
/ items = ("FEAR")
/ position = (90,50)
/ erase = false
</text>

....

<trial mytrial>
/ ontrialbegin = [
    if (script.subjectid==1) trial.mytrial.insertstimulustime(text.disgust_left,text.fear_right, 0)
    else trial.mytrial.insertstimulustime(text.disgust_right,text.fear_left, 0)
]
...
</trial?

But it doesn't work.
Any better idea?
By Dave - 11/22/2021

Athanasia - 11/22/2021
thank you very much. I would like to have your opinion also in that:
the position of these words should change BETWEEN participants according to their participant number (odd number: word DISGUST on the left and word FEAR on the right - even number: word FEAR on the left and word DISGUST on the right).
I created this:
...
<text disgust_left>
/ items = ("DISGUST")
/ position = (10,50)
/ erase = false
</text>

<text disgust_right>
/ items = ("DISGUST")
/ position = (90,50)
/ erase = false
</text>

<text fear_left>
/ items = ("FEAR")
/ position = (10,50)
/ erase = false
</text>

<text fear_right>
/ items = ("FEAR")
/ position = (90,50)
/ erase = false
</text>

....

<trial mytrial>
/ ontrialbegin = [
    if (script.subjectid==1) trial.mytrial.insertstimulustime(text.disgust_left,text.fear_right, 0)
    else trial.mytrial.insertstimulustime(text.disgust_right,text.fear_left, 0)
]
...
</trial?

But it doesn't work.
Any better idea?

FIrst, that's not how you test whether the subject ID is odd or even, and second, your use of the insertstimulustime() function is wrong. It has two arguments, the stimulus and the time, not three.

<trial mytrial>
/ ontrialbegin = [
    if (mod(script.subjectid, 2) == 1) {
        trial.mytrial.insertstimulustime(text.disgust_left, 0);
        trial.mytrial.insertstimulustime(text.fear_right, 0);
    } else {
        trial.mytrial.insertstimulustime(text.disgust_right, 0);
        trial.mytrial.insertstimulustime(text.fear_left, 0);
    }
]
...
</trial>