Millisecond Forums

Block and Experiment Script

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

By sarahlynmart@gmail.com - 11/20/2016

Hello,

I  am creating an experiment where I am creating five 1-2 minute blocks between each experimental block which consists of 150 trials.  During the blocks that are breaks, I have an instructional page appear.  Within the experimental blocks, I have a triangle randomly appear between some experimental trials. I have written the code for blocks but it says there is an error and the block is undefined.  Do I need to split up the blocks in the expt section?  And how do I ensure that the triangle is presented in every block? I have copy and pasted my script for your reference.  Thank you for your help!

<block faceitems>
/ trials = [1-750 = noreplace(WIfaceitems, WAfaceitems, BAfaceitems, BIfaceitems, objectitems)]
/ trials = [1-20 = triangle]
</block>

<expt faces>
/ preinstructions = (page.instructions)
/ blocks = [1 = faceitems; 2 = (page.blockbreak); 3 = triangle]
/onexptend = [values.completed = 1]
</expt>
By Dave - 11/20/2016

sarahlynmart@gmail.com - Sunday, November 20, 2016
Hello,

I  am creating an experiment where I am creating five 1-2 minute blocks between each experimental block which consists of 150 trials.  During the blocks that are breaks, I have an instructional page appear.  Within the experimental blocks, I have a triangle randomly appear between some experimental trials. I have written the code for blocks but it says there is an error and the block is undefined.  Do I need to split up the blocks in the expt section?  And how do I ensure that the triangle is presented in every block? I have copy and pasted my script for your reference.  Thank you for your help!

<block faceitems>
/ trials = [1-750 = noreplace(WIfaceitems, WAfaceitems, BAfaceitems, BIfaceitems, objectitems)]
/ trials = [1-20 = triangle]
</block>

<expt faces>
/ preinstructions = (page.instructions)
/ blocks = [1 = faceitems; 2 = (page.blockbreak); 3 = triangle]
/onexptend = [values.completed = 1]
</expt>

<expt faces>
/ preinstructions = (page.instructions)
/ blocks = [1 = faceitems; 2 = (page.blockbreak); 3 = triangle]
/onexptend = [values.completed = 1]
</expt>

A <page> is not a <block>. You cannot "run" a <page> via the <expt>'s /blocks attribute. You need to run a <block>, and that <block> has to display the <page> via its /pre- or /postinstructions attribute.