If this template helps then use it. If not then just delete and start from scratch.
PsychoPy version 3.0.0
I am currently trying to build an experiment in which participants complete two tasks. The primary task involves responding to a math problem via key press. I have managed to get this part working. However, during every trial, we want there to be a prompt for participants to choose whether or not to complete a secondary task (during the primary task). This prompt should appear in 20% of the trials, and if the participant elects to attempt this task, a different stimuli should appear on the screen, taking the place of the math problem. Once this secondary task is completed, the primary task (math problems) continues as normal.
For now, I am first seeking help on getting this prompt to popup during the primary task.
I have tried following the steps in this thread: Presentation of a sound in a random trial - #2 by Michael but I have not been successful. The text simply does not appear during any of the trials.
I am attaching screenshots of my builder view, as well as the code component I have been trying to work with.
Would anyone be able to give me some advice on how to set this up? Any and all help is appreciated. Please let me know if more information is needed!