No consecutive trials

Hi everyone,
I would like to try to create a code that allows me to avoid two consecutive trials with the same condition. Specifically, I would like to avoid two stop trials appearing consecutively, but I have no idea how to do this.
Thanks to those who will try to help me.

Are you using a spreadsheet? Can you please give an example showing your intention more clearly?
Would you like to skip the second trial if its condition is identical to the first? What happens when you have three consecutive trials with the same condition?


Hi and thank you for the response. Yes, I am using a spreadsheet. I have some stop trials and some go trials, if a stop trial appears I want the next trial to necessarily be a go. I don’t want the trial skipped, but I would like it to be randomized again.
If you are interested, I can provide you with an example file.

An example file will be helpful. Thank you.

With the column “codice”, I can distinguish the type of trial
file.xlsx (9.1 KB)