Moving Stimuli in E-prime

1,229 views
Skip to first unread message

Alice Cai

unread,
Dec 5, 2012, 11:39:07 AM12/5/12
to e-p...@googlegroups.com
Hi,

I have a question regarding my experiment design. I would like to create a moving stimuli where participants decide whether the box is moving vertically or horizontally. I know that I can use different slides changing at 50 ms. per slide with different locations for the box (left, middle, right) but the problem is I will need to create a lot of slides and the E-prime program runs out of memory space.

Is there any way to create just three slides, and have E-prime repeat these three slides until participants give a response? And then the experiment will jump to the next trial with three more slides?

Any help will be greatly appreciated! Thank you!

David McFarlane

unread,
Dec 5, 2012, 12:12:40 PM12/5/12
to e-p...@googlegroups.com
A couple thoughts just to point you in some direction. First, look at
the Samples area of the PST website, you should find some examples of
how to animate stimuli there. Second, try just changing the X & Y
properties of a Slide sub-object. E.g., put a SlideText sub-object onto
a Slide, open the Property Pages for the SlideText object, and put
[StimX] and [StimY] for the X & Y properties. Now you may manipulate
the StimX & StimY attributes either using a List or using c.SetAttrib in
inline code. (This works for simple animations, but for fancier things
you might have to resort to Canvas programming; see the appropriate
topics in the E-Basic Help facility).

Finally, I have a feeling this sort of thing has been answered before
(maybe even by me, but I am away from the machine where I keep my
E-Prime FAQ). So search the Group and the PST User Forum using terms
like "animate". Good luck.

-----
David McFarlane
E-Prime training online:
http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (twitter.com/EPrimeMaster)

/-----------
Stock reminder: 1) I do not work for PST. 2) PST's trained staff take
any and all questions at
http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive
to respond to all requests in 24-48 hours, so make full use of it. 3)
In addition, PST offers several instructional videos on their YouTube
channel (http://www.youtube.com/user/PSTNET ). 4) If you do get an
answer from PST staff, please extend the courtesy of posting their reply
back here for the sake of others.
\-----------

David McFarlane

unread,
Dec 5, 2012, 12:17:43 PM12/5/12
to e-p...@googlegroups.com
Actually, it doesn't even have to be a Slide sub-object. You can
manipulate the position of any visual object (e.g., TextDisplay,
ImageDisplay, MovieDisplay) by using attribute references for its X & Y
properties on the Frame tab -- assuming, of course, that its Width &
Height values make sense.

-- David McFarlane

Alice Cai

unread,
Dec 5, 2012, 2:18:13 PM12/5/12
to e-p...@googlegroups.com
Dear David,
 
Thank you so much, that was very helpful! Right now I have only one slide, and have many levels in the list to code for the location of the square (e.g., left, middle, right). I would like the slides to repeat itself until participants give a response. Once participants give a response, I want to give a 'feedback display'. I thought of using the jump function with labels, but the label can only jump within a procedure. This is a bit problematic because right now, even when participants give a response, it will only exit the procedure once all lists have been displayed (or when it reaches a time limit that I set, e.g., 4000 ms).
 
 
Also, I need to record reaction time to the moving stimuli. However, right now e-prime doesn't record RT from the very first slide that participants see, but only for the slide that the responded to. So in order to know how long participants took to respond, I will need to add up the number of slides that was presented before hand and multiply it by how long the slides were displayed for (50 ms). Is there an easier way to record reaction time?
 
Thank you very much for your help, please take your time to reply and any comments will be greatly appreciated!
 
Thank you again!
Alice

David McFarlane

unread,
Dec 5, 2012, 3:57:35 PM12/5/12
to e-p...@googlegroups.com
Alice,

Two brief thoughts...

1) You can use List.Terminate to exit out of a running List before it
reaches its own end -- see that topic in the E-Basic Help facility.
(With a bit of programming knowhow you don't even have to know the name
of the running List, but I am not near my FAQ now to point you to the
thread where I show that.)

2) Yes, adding up times is fraught with difficulty, you will almost
certainly fail to include some interim times and get wrong values. But
the E-Prime input mask facility really is beautiful once you fully
understand it. Put a Wait object just before the start of your
stimulus/response loop, outside the loop. Give that Wait a Duration of
0 (and think about the proper Onset Sync), and add your desired input
mask to this Wait instead of within the loop. Give this input mask a
Time Limit of (infinite). Now that Wait will look for a response any
time during your stimulus/response loop, and Wait.RT will be the RT from
the start of the loop until the response, without you having to compute
anything! My online E-Prime course actually includes an exercise where
we do this, might be worth looking into.

-----
David McFarlane
E-Prime training online:
http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (twitter.com/EPrimeMaster)


Alice Cai

unread,
Dec 12, 2012, 7:29:30 PM12/12/12
to e-p...@googlegroups.com
Dear David, 

Thank you very much for your help! The wait function is so useful and I finally got my experiment working thanks to your help! 

I really appreciate you taking the time to reply, and I hope you have a great Christmas and New Years!
Best wishes,
Alice
Reply all
Reply to author
Forward
0 new messages