Template: Question Every X Trials (Keyboard and / or Mouse Response)
Question Every X Trials (Keyboard and / or Mouse Response)

Required Experiment Builder Version: 1.10.1630 or higher
EyeLink Required: Yes
Type: Complete Example
Difficulty Level: Easy to Intermediate

This example demonstrates:
  • How to reference Data Source to both single and multi-line text objects for display
  • How to use Mouse and Keyboard triggers
  • How to randomize trial order allowing different questions for different participants
  • How to automatically generate Interest Areas for Data Viewer integration
  • How to reset the mouse / pointer location between trials
**Additional detailed information about the project is given in the notes section for most nodes. To see notes for a given node, either mouse over that node or click on it to display the notes window. If the notes window is not visible, go to the "View" drop down menu in Experiment Builder, select "Properties", and check "Note".


These examples are modifications of the TextLine example that comes with Experiment Builder. In these examples, we present 12 sentences in randomized order, with a question screen appearing after every third sentence. The questions and answers are all linked to specific sentences in the Data Source. Which trial numbers' questions will be displayed in any given session is controlled by a list in a Conditional Trigger node (COND_Q_TRIAL) -- as currently set, a question will appear every third trial. As stimulus order is randomized, which sentence/question combinations those question trials will be varies. This list can easily be changed to have question trials on any trial iteration(s) desired.

These examples use both standard (single line) text resources (for the sentences) and multi-line text resources (for the questions and answers). Combining the question and answer text into a multi-line text resource makes the automatic Interest Area creation ("Use Runtime Word Segment Interest Area" is enabled) segment the Interest Areas in a much more useful format than if multiple single line text resources were used. Specifically, each single line entry would have its Interest Areas' numbering start at 1, whereas multi-line text will count from the first section to the last in proper sequence.

The two versions provided operate similarly. The "kb" version only accepts keyboard response input. The "kb_or_mouse" version accepts both keyboard input or response item selection via a mouse click. The mouse function uses an on-screen selection pointer that tracks the mouse, and selection boxes associated with each of the three possible answers. Between trials, the mouse pointer location is reset to the centre of the screen to avoid the pointer appearing at the location of the last response on the next trial (see the RESET_VARIABLES node in the TRIAL sequence).


Note that the keyboard and mouse triggers for the question sections each have a similar beginning to their messages. This allows the user to set the Interest Period end message to that beginning section without worrying about what answer or response method was used. For example, one could set the following Interest Periods:

Text Interest Period:
  • start message "SYNCTIME_TEXT"
  • end message "textpress_" (to capture either "textpress_mouse" or "textpress_keyboard")
Question Interest Period:
  • start message "SYNCTIME_QUESTION"
  • end message "q_answered" (captures any of the possible question responses).
Note also that, if you set TEXT and QUESTION Interest Periods as above, the Interest Areas for both periods may display regardless of which period is selected. This can be changed by going into Data Viewer's menu -- Edit >> Preferences, selecting Data Filters, and deselecting "Show Interest Areas Pre Interest Period" and "Show Interest Areas Post Interest Period". With these deselected, you will only see Interest Areas associated with stimuli in the actively selected Interest Period.

If setting Interest Periods as above makes certain trials appear to have no Interest Areas, this is likely due to a minor timing disagreement. This should be fixable by going into the Interest Period Editor in Data Viewer and changing the start event offset for the Interest Period in question to -2 ms.

See also: Instructions:
  1. Download the Question_every_x_trials_kb.ebz or Question_every_x_trials_kb_or_mouse.ebz example from this message.
  2. Launch the Experiment Builder application.
  3. Unpack the file/files to a location on your Experiment Builder PC with "File -> Unpack".
  4. Open the project in Experiment Builder.
  5. Deploy the project to a new folder.
  6. Run the Question_every_x_trials_kb.exe or Question_every_x_trials_kb_or_mouse.exe from the deployed directory.

.ebz   Question_every_x_trials_kb.ebz (Size: 45.59 KB / Downloads: 26)

.ebz   Question_every_x_trials_kb_or_mouse.ebz (Size: 52.2 KB / Downloads: 14)