﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 5  » Breaks at modifiable intervals</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 08 Apr 2026 03:38:44 GMT</lastBuildDate><ttl>20</ttl><item><title>Breaks at modifiable intervals</title><link>https://forums.millisecond.com/Topic18998.aspx</link><description>Greetings,&lt;br/&gt;&lt;br/&gt;We are trying to introduce breaks into our experiment and thought of doing it the following way: We have six different trials and we would like to have a (seventh) breaktrial every 'x' amount of trials. We thought of adding to every trial an /ontrialbegin add '+1' to a counter, and add at the end of a trial a conditional branch to the break trial if said trial counter reaches 'x'. At the end of the break trial, we would then add an /ontrialend reset the counter. However, we just cannot figure out how to add this counter; expressions and values don't seem to work... Things like totaltrialcount we can't use because it can't be reset and trialcount doesn't sum over the 6 different trials.&lt;br/&gt;&lt;br/&gt;Any tips on how to make this work, or otherwise alternative ideas to implement breaks in this way? (We prefer to avoid using the elapsedtime variable.)&lt;br/&gt;&lt;br/&gt;Thanks a ton in advance!&lt;br/&gt;</description><pubDate>Tue, 03 May 2016 11:24:20 GMT</pubDate><dc:creator>SamSam</dc:creator></item><item><title>RE: Breaks at modifiable intervals</title><link>https://forums.millisecond.com/Topic19004.aspx</link><description>Ah, we were so close... This works perfectly. Thanks again, Dave! Much appreciated.&lt;br/&gt;</description><pubDate>Tue, 03 May 2016 11:24:20 GMT</pubDate><dc:creator>SamSam</dc:creator></item><item><title>RE: Breaks at modifiable intervals</title><link>https://forums.millisecond.com/Topic19001.aspx</link><description>A &amp;lt;values&amp;gt; entry is exactly what you should use. Increase the value by one in each of your "regular" trials (the six &amp;lt;trial&amp;gt; elements you mentioned). /branch from those trials to the "break" &amp;lt;trial&amp;gt; element if the trialcount value is equal to "x". In the "break" &amp;lt;trial&amp;gt;, reset the value back to zero. Quick example:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ trialcounter = 0&lt;br/&gt;/ break_after_n = 4&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-20 = noreplace(a,b)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial a&amp;gt;&lt;br/&gt;/ pretrialpause = 500&lt;br/&gt;/ ontrialbegin = [values.trialcounter += 1]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;/ branch = [if (values.trialcounter == values.break_after_n) trial.break]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial b&amp;gt;&lt;br/&gt;/ pretrialpause = 500&lt;br/&gt;/ ontrialbegin = [values.trialcounter += 1]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;/ branch = [if (values.trialcounter == values.break_after_n) trial.break]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial break&amp;gt;&lt;br/&gt;/ ontrialend = [values.trialcounter = 0]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%script.currenttrial%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;After every set of 4 "regular" trials, a "break" will be invoked.&lt;br/&gt;</description><pubDate>Tue, 03 May 2016 10:03:01 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>