Howdy, Stranger!

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

Supported by

Problem with run if statements

Hello,

I am building a three-picture VWP experiment on OpenSesame. Half of the audio stimuli are followed by an animation, and the other half are followed by an audio. I created a column (named animation) stating whether there is an animation for an item (1:Yes, 0: No), and another column (named audio) stating whether there is an audio file (1:Yes, 0: No). I added two sequences to my block; one for the animation option and one for the audio option. In the main sequence, I stated that the animation sequence should run if [animation] = 1, and the other sequence should run if [audio] = 1. However, this does not seem to work. I get this error: "Invalid path to video file: NA (file not found)".

I understand that it looked for a video file named NA since NA was written in the column where the names of animation files were listed, and failed to find it. However, for those items the column 'animation' is set to 0, so it should't try to run any files. Isn't that the case? I am not sure where I did something wrong, or why it ignores my run if statement.

Any ideas on how to fix this problem?

Thanks!

Comments

  • Hi @FKaraca ,

    The run-if statement only applies to the run phase of items. Many things (such as loading files) happen in the prepare phase, which is a strategy to improve temporal precision. In your case, this means that the prepare phase for all items in your trial sequence should work, even if not all items will be executed in the end. Does that make sense? Using placeholder video and sound files would be one way to accomplish this, such that even for animation trials a valid soundfile is specified, and vice versa.

    See also:

    Cheers!

    Sebastiaan

  • Hi Sebastiaan,

    Thank you for your reply. That makes perfect sense! Having a placeholder video fixed the problem.

    Best,

    Figen

Sign In or Register to comment.