Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Generated by OpenSesame 0.27.2~pre1 (Frisky Freud)
- # Sat Mar 16 22:19:56 2013 (posix)
- # <http://www.cogsci.nl/opensesame>
- set foreground "white"
- set subject_parity "even"
- set font_size "18"
- set description "A template containing a practice and an experimental phase"
- set title "Extended template"
- set start "experiment"
- set font_bold "no"
- set coordinates "relative"
- set height "768"
- set mouse_backend "legacy"
- set width "1024"
- set compensation "0"
- set sampler_backend "legacy"
- set keyboard_backend "legacy"
- set background "black"
- set subject_nr "0"
- set canvas_backend "legacy"
- set font_family "mono"
- set synth_backend "legacy"
- set font_italic "no"
- define feedback feedback
- set duration "500"
- set reset_variables "yes"
- set description "Provides feedback to the participant"
- draw textline 0.0 0.0 "X" center=1 color=white font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
- define loop block_loop
- set repeat "1"
- set description "A single block of trials"
- set skip "0"
- set offset "no"
- set item "trial_sequence"
- set column_order "correct_response"
- set cycles "10"
- set order "random"
- setcycle 0 correct_response "space"
- setcycle 1 correct_response "space"
- setcycle 2 correct_response "space"
- setcycle 3 correct_response "space"
- setcycle 4 correct_response "space"
- setcycle 5 correct_response "space"
- setcycle 6 correct_response "space"
- setcycle 7 correct_response "space"
- setcycle 8 correct_response "space"
- setcycle 9 correct_response "space"
- run trial_sequence
- define sketchpad first_chance_stim
- set duration "0"
- set description "Displays stimuli"
- set start_response_interval "no"
- draw textline 0 -96 "Press a key" center=1 color=white font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
- define sequence trial_sequence
- set flush_keyboard "yes"
- set description "A single trial"
- run first_chance_stim "always"
- run first_chance_response "always"
- run feedback "[correct]=0"
- run inline_script "always"
- run second_chance_stim "[second_chance]=yes"
- run second_chance_response "[second_chance]=yes"
- run logger "always"
- define sequence experiment
- set flush_keyboard "yes"
- set description "The main sequence of the experiment"
- run experimental_loop "always"
- define keyboard_response first_chance_response
- set description "Collects keyboard responses"
- set timeout "infinite"
- set flush "yes"
- define loop experimental_loop
- set repeat "1"
- set description "A loop containing one or more experimental blocks"
- set item "block_sequence"
- set column_order "practice"
- set cycles "1"
- set order "random"
- setcycle 0 practice "no"
- run block_sequence
- define keyboard_response second_chance_response
- set description "Collects keyboard responses"
- set timeout "infinite"
- set flush "yes"
- define inline_script inline_script
- ___run__
- # First, check whether the response was correct by using the
- # built-in OpenSesame variable 'correct', It has the
- # value 1 if the most recent response was correct, and the
- # value 0 if it was incorrect.
- # We retrieve this variable by using the experiment function
- # 'self.get()'.
- # If the response was correct, we DON'T need to run the 'second
- # chance' items:
- if self.get("correct") == 1:
- exp.set("second_chance", 'no')
- # If the response was incorrect, we DO need to run the 'second
- # chance items:
- elif self.get("correct") == 0:
- exp.set("second_chance", 'yes')
- __end__
- set _prepare ""
- set description "Executes Python code"
- define sketchpad second_chance_stim
- set duration "0"
- set description "Displays stimuli"
- set start_response_interval "no"
- draw textline 0 -96 "Press a key" center=1 color=white font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
- draw textline 0 -256 "Your response was not correct." center=1 color=white font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
- draw textline 0 -192 "We give you a second chance:" center=1 color=white font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
- define logger logger
- set description "Logs experimental data"
- define sequence block_sequence
- set flush_keyboard "yes"
- set description "A sequence containing a single block of trials followed by feedback to the participant"
- run block_loop "always"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement