#### Howdy, Stranger!

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

Supported by

# [solved] Rotating Fixation Point

edited June 2013

Hi Everyone,

I am an absolute beginner at programming and brand new to opensesame, so I apologise if my questions seem very trivial. I'm setting up my experiment and what I would like to do is at the beginning of each trial I would like a fixation point, however, I want my fixation point to randomly vary over 4 different positions (i.e. top right, top left, bottom right, bottom left). I am not sure how I go about this, could somebody please give me a step-by-step instruction on what to do (baring in mind my how novice I am).

Thank you

Vikki

• edited 12:19AM

Hi Vikki,

Welcome to the forum!

If you're brand new, you might want to start by doing the tutorial. It won't take too long, and it will really help you to get started. It will also help you to understand the explanation below.

Regarding your question. There are a couple of ways to do this. I'll explain two:

Using flexible coordinates
First, create two variables in a loop table, and give them the coordinates that you want to use. Let's call them x_fix and y_fix to indicate that they are the coordinates of the fixation dot. Say, like this:

```x_fix y_fix
-100 -100
-100  100
100   100
100  -100```

Next, draw a fixation dot at a random location on the sketchpad. Right click on the fixation dot and select edit. Now, change the piece of script so that the static coordinate values are replaced by the variables, like so:

`draw fixdot [x_fix] [y_fix] color=white show_if="always"`

Now press ok and you're done!

Using multiple sketchpads and the 'run if' option in a sequence
First create a single variable, let's call it fix_pos, in a loop table that indicates the position of the fixation dot. Say, like this:

```fix_pos
topleft
topright
bottomleft
bottomright```

Next, create a couple of different sketchpads with the fixation dots as you'd like to see them. Then use the run-if statement of the sequence that contains the sketchpad to define when the sketchpads should be shown. For example, the run-if statement for the sketchpad with the fixation dot in the top left should look like this:

`[fix_pos] = topleft`

Hope this helps!

Cheers,
Sebastiaan

There's much bigger issues in the world, I know. But I first have to take care of the world I know.
cogsci.nl/smathot

• edited 12:19AM

Thank you for you rapid response :-)

I shall do your suggestions. I have another question, but I will have a go at the tutorial before I ask, see if I can problem solve!

Thanks again,

Vikki