Thread Tools  
MonikaT
Senior Member
 
Join Date: Mar 2008
MonikaT is on a distinguished road Posts: 1,279
Highlights:

This experiment prompts the participant for an answer and uses conditional branching to select a path based on the response. It uses a code with two values that is set at the event level based on the participant's response, then evaluated using macros at the block level in order to determine the next block to present.

Details:
  • A code is created with two values, "yes" and "no".
  • In the Participant Input's dialog, two keyboard responses are created: "Yes" and "No".
  • Event "Instructions": in the Event Editor's Correct Response tab, the correct response is set to "Yes". The important point is that a correct response must be selected so that we can provide feedback based on correctness; we chose "Yes".
  • Event "Instructions": in the Event Editor's Feedback tab, we set the value of the code to either "Yes" or "No" based on the participant's response. In the next step, we will use this information to branch to a specific block.
  • Block "Question": we create macro "Go to different blocks depending on answer". If the expression evaluates to True, we don't do anything so that the next block, "Numbers", is presented. If the expression evaluates to False, we instruct SuperLab to go to block "Letters".
  • Block "Numbers": we create a macro called "Exit experiment". Without this macro, both blocks "Numbers" and "Letters" will be presented. Note that this macro is set to run After all the trials in the block have been presented (see the Block Editor's Macros tab).


Requirements


SuperLab 4.0.7 or later is needed.
Attached Files
File Type: zip Selecting a Block (Mac Version)sl4.zip (2.1 KB, 55 views)
File Type: zip Selecting a Block (Windows Version)sl4.zip (2.1 KB, 103 views)
Reply With Quote
Thread Tools
Posting Rules
Forum Jump:
Copyright Cedrus Corporation, 1991-2014.
All times are GMT -7. The time now is 05:03 PM.