This example illustrates a dual task experiment. A word is displayed for varying durations (5 or 10 seconds). At the same time, the subject is asked to respond to digits presented for varying durations (500, 750, 1000 msec) by pressing the spacebar when a "3" is presented.
In this experiment, a word is displayed for 5-10 seconds, while the subject is asked to respond to a series of trials involving responding to digits. The start time is determined at the beginning of the trial. The object presenting the word has a Duration value of zero msec. This displays the word, then immediately begins presentation of the digit task. The duration of the word is set as an attribute in the WordList, but the actual run-time duration is monitored by the digit trials.
At the end of each digit presentation trial, the remaining time is reviewed. If the max amount of time (word duration) has elapsed, or if there is less than 500 msec remaining, the digit trials are
terminated. Note that DigitlList is set to a large number of trials. Only the number of trials that can be run within the allotted time will take place.
DigitDurList is nested in order to choose a random duration for the digits on each digit trial.