Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Add new item in sketchpad

Hello everyone,

I have designed an experiment that goes as such:

  1. I have a pool of 5 stimuli (pictures).
  2. Show me predefined triplets of those stimuli in random order (The triplets are all defined in a loop item before the presentation sketchpads.).
  3. After the presentation of the triplet, I want to show again one of the pictures, selected randomly.

I have done steps 1 and 2. I am completely stuck in step 3.... I added a python script before the last sketchpad and I have written this:

options_cvg = [ var.castanets, var.violin, var.guitar ] #these are the possible options of stimuli you can show me if the triplet is the triplet named 'cvg'

if var.sequence == 'cvg': #if the sequence is the sequence named 'cvg'

var.lab1 = random.choice(options_cvg) #then make the variable named lab1 be a random choice of the possible options


Then I added a sketchpad and wrote the following:

draw image center=1 file=var.lab1 scale=1 show_if=True x=-288 y=-192 z_index=0


However, it doesn't run and I keep getting error messages. Where should I define the var.lab1 variable?

Thanks!!

Comments

  • Hi,

    First thing you should do, is provide the error messages, or share your experiment. Based on the provided information, I can't help you. My first intuition says that this is a prepare/run phase issue https://osdoc.cogsci.nl/4.0/manual/prepare-run/

    But yeah, without further information, this is purely guessing.

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.