Millisecond Forums

Replacing a text item multiple times within a trial

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

By pops - 5/27/2019

Hi there,
I'm trying to display a counter that starts at 1 and goes up to (max) 60 at approximately 100 ms per number. I can't use a video because I need to end the trial when the counter gets up to a certain number (different per participant). Using the clock (stopwatch) element will take too long (will only advance in increments of 1 second).

I am trying to do this using one text element (text.LevelCountUp) with multiple items (/items = ("1", "2") etc .
Then, during the trial, I use the insertstimulustime command to try and present the numbers sequentially at a rate of 100 ms. Here is a short version.

<trial CountUpPoints>
/ ontrialbegin =[trial.CountUpPoints.clearstimulusframes();
trial.CountUpPoints.insertstimulustime(picture.LevelUp, 0);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(1),100);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(2),200);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(3),300);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(4),400);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(5),500);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(6),600);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(7),700);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(8),800);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(9),900);]
/timeout = 1000
</trial>

Needless to say it is not working. Is this because I can only present one unique item from a text element on each trial? Should I make 60 unique text elements and then set their onsettimes within the trial?
I realise that I could run 60 trials selecting the next text item at the beginning of each trial (which would prob be more efficient coding wise) but then this means that I am creating a unique block, which makes integration at the <expt> level more complicated.
Any thoughts appreciated on the best way forward.
By Dave - 5/27/2019

pops - 5/27/2019
Hi there,
I'm trying to display a counter that starts at 1 and goes up to (max) 60 at approximately 100 ms per number. I can't use a video because I need to end the trial when the counter gets up to a certain number (different per participant). Using the clock (stopwatch) element will take too long (will only advance in increments of 1 second).

I am trying to do this using one text element (text.LevelCountUp) with multiple items (/items = ("1", "2") etc .
Then, during the trial, I use the insertstimulustime command to try and present the numbers sequentially at a rate of 100 ms. Here is a short version.

<trial CountUpPoints>
/ ontrialbegin =[trial.CountUpPoints.clearstimulusframes();
trial.CountUpPoints.insertstimulustime(picture.LevelUp, 0);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(1),100);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(2),200);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(3),300);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(4),400);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(5),500);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(6),600);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(7),700);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(8),800);
trial.CountUpPoints.insertstimulustime(text.LevelCountUp.item(9),900);]
/timeout = 1000
</trial>

Needless to say it is not working. Is this because I can only present one unique item from a text element on each trial? Should I make 60 unique text elements and then set their onsettimes within the trial?
I realise that I could run 60 trials selecting the next text item at the beginning of each trial (which would prob be more efficient coding wise) but then this means that I am creating a unique block, which makes integration at the <expt> level more complicated.
Any thoughts appreciated on the best way forward.

> Needless to say it is not working. Is this because I can only present one unique item from a text element on each trial?

Yes, that's exactly right.

> Should I make 60 unique text elements and then set their onsettimes within the trial?

That would be the way to go.


By pops - 5/28/2019


I realised that I could just make one looping trial with the branch element at the end to repeat it so integration at the <block> and <expt> levels is actually very simple. So I now have one list of items, one text element and one trial - much more sensible! Thanks for the fast response.