How to add Stimulus-onset asynchrony (SOA) in the loop?

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): WIN 10
PsychoPy version (e.g. 1.84.x): v2023.2.3
Standard Standalone? (y/n) If not then what?: n
What are you trying to achieve?:
Hi, I get a problem and hope you can help me.
I am designing a visual texture discrimination task(TDT), which have one task that participant need to star at fixation part and then fixation part will show ‘L’ or ‘T’ randomly and nearby the randomly letter showed have three different orientaiton bars, after that will show a mask to discrupt the visual learning .
I want to set the SOA between task and mask and depend on the correct rate (if the correct rate >=80%, then move to next soa ) to automaticaly adjust the soa from 200ms start then follow the soa list [200,180,160,140,120,100,80,60,40,20]

What did you try to make it work?:
I try to use the loop function and it doesn’t work.

Thank you for your help in advanced.
If I did something wrong, can you kindly to tell me about it (How to revise? or adjust? )
Much appriciate~

I’m not familiar with the staircase component but I think that your step sizes look wrong. Shouldn’t the first step size be -20 (or possibly 20)? A staircase is used to home in on a value using ever decreasing step sizes.

Well, in this case I think to let the soa start from the longest then adjust to the shortest. (the process is from top to down/ 200 to 20) That’s the reason why I put the first step as 200 instead 20(as you mentioned) .
But I try to change the step size as you mentioned, it still doesn’t work.
Anyhow thank you for your comment!