Limiting number of identical picture trials presented sequentially

I have an associated query to a recent post by ‘psycho78’ (http://community.cedrus.com/showthread.php?t=1248). I have two main trials that are randomly repeated many times (e.g., 100). Each trial has two events: a pictorial cue and then a circle that appears on the left of screen (LeftPic Trial), or on the right of screen (RightPic Trial). Each circle is positioned by changing the horizontal pixel values; they are essentially the same picture file. I have attached a short version of the SL4.5 file if it helps understand how I’ve set it up.

I am wondering how I can make sure that a specific trial is not repeated any more than four times in a row? I have worked through the solution given to ‘psycho78’ with macros but I can’t get it to work. I have a feeling it is because this particular solution uses two trials, but many stimuli from lists as events. I have two events per trial, but many trials.

Any help would be greatly appreciated. Thanks in advance :slight_smile:

SIOR Example.sl4 (11.2 KB)

Can you please post your experiment as an Experiment Package? You can find this under the File menu within SuperLab.

Here it is! Thanks MonikaT

SIOR Example.zip (31.1 KB)

The experiment that was posted does not have any of the codes or macros as shown in thread 1248. Can you post the experiment with the codes and macros that you have already created?