Dear Pavlovia Community,
Yet another question regarding my time-based PM experiment (…and hopefully the last…):
The experiment begins with a training loop, consisting of a task routine and a feedback routine.
In the task routine participants perform a lexical decision task by responding either with the left or right arrow key. After each response or after a time-out of 4 seconds, the loop moves on to the feedback routine.
There are four possible feedbacks:
a) For correct and timely responses ‘correct’,
b) for timely but false responses ‘false’,
c) for responses below 0.2s ‘too fast’
d) and for responses slower than 3.5s or non-responses ‘too slow’
In the offline version all four feedbacks work perfectly fine.
In the online version all feedback options except for ‘too slow’ work. Instead, if no response is given the black text ‘Hello World’ appears.
Below is the JS autotranslate:
var msgColor;
var msg;
if ((blockType === "practice")) {
try {
if ((probeResponsePrac.rt < 0.2)) {
msgColor = "red";
msg = "Zu Schnell!";
} else {
if ((probeResponsePrac.rt < 4)) {
if (probeResponsePrac.corr) {
msgColor = "green";
msg = "Richtig";
} else {
msg = "Falsch";
msgColor = "red";
}
}
}
} catch(e) {
msg = "Zu Langsam!";
msgColor = "red";
}
} else {
if ((blockType === "probe")) {
msg = "";
}
}
I have tried swapping the try - catch loop with a simple if else loop, but this resulted in the same issue.
I have also tried to create another clock and link the ‘too slow’ feedback to a clock time-out rather than a non-response, but again no success.
Another attempt was adding
if (((probeResponse.rt > 4)) || ((probeResponse.rt === " "))) {
msg = "Too Slow!";
}
But this resulted in the TypeError: Module specifier, ‘time’ does not start with “/”, “./”, or "…/„.
Ideally, I would just like to specify non-response, but so far I wasn’t able to find out how to do this.
Thank you so much, best wishes,
Jasmine