Depends on what you want the code to do -- which is not obvious from your script. For the record:
/ ontrialbegin = [values.item=counter.items.selectedvalue; ...]
will sample a value from the counter and store it in values.item. values.item, though, is never actually used for anything in the script. The respective counter is set to '/ selectionrate = always' for reasons unclear to me. You'd need that setting if you wanted to pull several *different* values from said counter in a single trial. The various <picture> elements reference the counter as a dependency via '/select = current(items)', the intention of which also remains unclear to me.
Regards,
~Dave
First of all, Dave, you are awesome. Thanks for your help.
My goals:
Best regards,
Jeff
Yes. Note that '/selectionrate = trial' is what a counter defaults to.
Yes, what you've done works (at least looks like it), but it does so by accident rather than by good design (no offense). Several more straightforward / clearer strategies:
- Simply have all of the various stimulus elements (<picture>, <sound>, etc.) reference the counter directly in their /select attributes (/select = items). The counter will supply one value (i.e., here: item index #) per trial (see above), all elements will thus retrieve the correct item set.
- Alternatively keep your /ontrialbegin statement and use values.item in /select (/select = values.item)
Your different trial elements take care of that. The practice trials display those sounds, etc., the test trials don't.
No offense taken. "I'd rather be lucky than good". [:D]