Millisecond Forums

Problems about inserting a timer in CCT task

https://forums.millisecond.com/Topic18662.aspx

By EM9444 - 3/17/2016

I am doing a project investigating risk-taking using the Columbia Card Task (delayed). I want to insert a timer in the task but I have encountered the following problems:
1) I don't know how to reset the timer per gameround. When I type / resetrate = trial, it doesn't work since the trials are defined as <trial getcondition>, <trial pickcard> and <trial turnover>. It will reset when I pick the cards and press the button "turnover"
2) I want to know how to make all the cards in each round turn over when time is out

Thank you!
By Dave - 3/17/2016

#1: Set the clock's /resetrate to block and reset the timer at the start of each round, i.e., in <trial getcondition>:

<trial getcondition>
/ ontrialbegin = [list.pickcardresponses.clearitems(); list.pickcardresponses.reset();
    clock.timer.resettime(); ]
...
</trial>

#2: You need to define a /timeout for <trial pickcard>. You need to set the available time to 1000 at the start of each round (in <trial getcondition>. You need to subtract the latency of <trial pickcard> /ontrialend. If no response occurs -- i.e. the trial timed out -- invoke <trial turncard>.

See the attached file for details.
By EM9444 - 3/17/2016

Thank you so much!!!