zooming in and out of stimuli with key press/or joystick, repeating the trial for every incorrect response
Hi Fellow E-Primers,
I am designing an Approach Avoidance task (AAT ) and there are three things that I need help with:
1. the stimuli (images) need to be tilted either to the right or left. How do I achieve this? Even if I have them tilted before loading them on E-Prime, when I do load them, they become untitled.
2. The images need to either zoom in or out when the joystick is moved/ or a key is pressed
3. the trial needs to be repeated for any incorrect response.
I am new to e prime and scripting/programming, so any inputs on when and were in the flow do the inline scripts for any of the above come in, and the related commands will be very helpful.
Thank you,
Lavanya
-
Hey Lavanya,
I am probably so late to answer this, but I found an overall solution to the questions you raised. I included it here just in case anyone might have similar issues in the future.
You can implement the "ProcessJoystick" inline code that e-prime people wrote in the JoyStickSample.e2 (I included the source below this post).
2) for this I created a Slide object and made its duration to "0", then included an InLine with the below part is included to the "ProcessJoyStick" inline code that the sample JoyStickSample.e2 had. I basically track the joystick cursor location, and if it is higher than the center location, I increase the width and height of the image by the cursor location (Y location). Then I clear the previously drawn image to eliminate any persisting parts of the image on the screen.
'Loop the following until a specific point on the Slide object is passedDim xM As SlideImage
Set xM = CSlideImage(CSlide(Rte.GetObject("DirectionTask")).States.Item("Default").Objects("Image1"))Do While JoystickMask.IsPending()DonCurrentY = Joystick.GetPosition.CursorYnDiffY = nInitY - nCurrentYnCurrentX = Joystick.GetPosition.CursorXnDiffX = nInitX - nCurrentXxM.Height = nCurrentYxM.Width = nCurrentYxM.DrawxM.ClearDebug.Print nCurrentY'Set xG = CSlideImage(CSlide(Rte.GetObject("testImageSlide")).States.Item("Default").Objects("Image1"))Loop Until nCurrentX > MiddleX + 150 Or nCurrentX < MiddleX - 150The bold parts are the things I included in the "ProcessJoystick" inline code. You can apply the same logic to the other/any questions you have. You can do those operations listed here: https://pstnet.com/ecr/#t=E-Objects%2FSlideImage-Object.htm[JoystickSample]: I highly recommend checking the sample task of e-prime: https://support.pstnet.com/hc/en-us/articles/115016040968-Joystick-Sample-29950-Best,Gorkem
Please sign in to leave a comment.
Comments
1 comment