Reply To: Restart trial

PennController for IBEX Forums Support Restart trial Reply To: Restart trial

#7073
Jeremy
Keymaster

You cannot use getVar that way, as explained in this guide I mentioned earlier

Your first attempt was on the right track, but maybe you forgot to include the trial number in addition to the selection index?

const whichOne = (numbers, selectorName, ex) => numbers.map( number =>
    getSelector(selectorName).test.selected(getImage("o" + number))
        .success(
            newAudio("o" + number + "selected", "ex" + ex + "o" + number + ".m4a")
                .play()
                .wait()
            ,
            getVar("selected").set(number)
        )
)

and then use it like this:

...whichOne([1,2,3,4,5,6], "response", exNum)

Jeremy