Making a routine (subtask) not being randomized

Hi there, I have 5 subtasks (2 attention tasks and 3 actual tasks). 2 attention tasks are designed to draw participants’ attention, and have them to be ready for the new task. 3 actual subtasks are where participants would need to do the task and make judgments. My design for the task is: actual task – attention task–actual task --attention – actual task. 2 attention tasks stay in the same position, and 3 actual subtasks are randomized. I was able to make 3 actual subtasks counterbalanced, but whenever I add the attention task in the xlsx, all 5 tasks are randomized (showed up something like this: attention task–attention task --actual task --actual task-- actual task).

Can anyone help me with how to make a certain task stay in the same position and randomized the others??? Please!!! Comments are highly appreciated!!!

THis is actual task 1’s loop info:
Screen Shot 2023-01-04 at 4.25.15 PM

This is attention task 1’s loop info
Screen Shot 2023-01-04 at 4.26.29 PM

Happy to provide more info!!Thank you in advance!!!

The way I would do this is to set nRepAttention = 1 in Begin Experiment and then add a code component

if inner_shame.thisN == 2:
     nRepAttention = 0

(assming inner_shame is the name of the appropriate loop that needs to run 3 times)