Hi All,
I'm trying to get my critical words to appear for a different time than all other words in a sentence. My solution so far is to add # before every critical word in the stimuli set, and set the timing for that word in the wordPauseTimeout function in DashedSentence.
So, my stimuli look something like this:
[["practice1",1], "DashedSentence", {s: "Word word word #critical and another #critical"},"Question", {q:"Question? ", as: ["target","word"]}],
wordPauseTimeout function to display targets for 3000ms:
if (this.mode == "speeded acceptability") {
var t = this;
function wordTimeout() {
t.blankWord(t.currentWord);
++(t.currentWord);
if (t.currentWord >= t.stoppingPoint)
t.finishedCallback([[["Sentence (or sentence MD5)", t.sentenceDesc]]]);
else
t.utils.setTimeout(wordPauseTimeout, t.wordPauseTime);
}
function wordPauseTimeout() {
t.showWord(t.currentWord);
t.utils.clearTimeout(wordPauseTimeout);
let duration = t.wordTime;
if (t.words[t.currentWord].substring(0,1) == "#") {
duration = 3000;
}
t.utils.setTimeout(wordTimeout, duration);
}
wordPauseTimeout();
What I can't figure out though is how to get rid of the # for the actual word presentation? I tried putting an if statement that crops and presents currentWord in various places in DashedSentence, but it either ends up not cropping them, or cropping them before wordPauseTimeout manipulates the timing, so critical words end up not being presented for 3000ms. Any pointers would be appreciated!