Millisecond Forums

Script sometimes doesn't output last trial

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

By Psych.Lab - 4/29/2014

Hi Everyone,

I'm trying to add a simple open ended question at the end of the already existing Flanker Task script I downloaded online. I added this as a block (called block.donate_intro) with 1 trial composed of an "openended" question. However, sometimes when I run the script the instruction page appears, but the open ended question doesn't. It doesn't even appear on the output. Other times, however, it runs perfectly.

Am I adding this in the incorrect way? Why is it not working every time?

Attached is my entire script. I hope someone can help! 

Thanks!
By Dave - 4/29/2014

The block you added runs one <trial> element, which displays the "instructions":

<block donate_intro>
/trials = [1 = instruct1]
</block>

That <trial> then either does or does not invoke the <openended> element via /branch depending on the response:

<trial instruct1>
/stimulusframes = [1 = instruction1]
/validresponse = (28, 50, 46)
/branch = [if (trial.instruct1.response == 50) openended.donate]
[...]
</trial>