psychopy.org | Reference | Downloads | Github

Countdowns for a routine

Hi, I want to use a countdown in a routine for certain times. For example, I have a routine that lasts 100 seconds. I want to use two or more countdowns at different times. The first is from 20-30 seconds of the routine. I want to use a 10-second countdown for this period. And I will do the same for different periods in a routine. How can I do that? Can someone help me, please?

I have code for this in my code snippets document.

1 Like

Thanks for your reply. I have tried it. It begins with the routine and ends with the routine. For example, it starts 00:00 and ends 01:00. How can I turn this into a 30sec countdown? Also, I am wondering how I can start this countdown in the middle of the routine( e.g. 20 sec later). Can you help me with this?

It shouldn’t count up if you have something like this.

Set exptTime=50 in Begin Routine

Add

if secs <= 30:
     clock_time.text = str(...

You can also remove references to minutes if your countdown is from 30 to 0.