This article applies to:
E-Prime 3.0
E-Prime 2.0
E-Prime 1.x
Detail
This experiment illustrates the use of a global variable and InLine script to award points based on the responses made by the user.
Abstract
Attributes are set to allow presentation of the running total of points on each trial as well as the total points achieved.
When the 'TrialList' List object is run, the 'Correct' attribute in the TrialList is set to determine if a particular level was responded to correctly or incorrectly.
Following the presentation of the 'Stimulus' object, the InLine object 'AwardPoints' adjusts a variable (Points) according to whether or not the user responded correctly. If the user responds correctly, the variable is increased by 10. If the user responds incorrectly, the variable is decreased by 10. In addition, the attribute 'TempPoints', is used to maintain a running score for the user. The variable 'Points' is defined globally in the User Script (ALT+7).
A FeedbackDisplay object is used to inform the user as to whether or not they responded correctly, and also references the attribute 'TempPoints' to display the user's running score.
This example runs 4 trials. At the end of the trials, the final score is displayed.
Comments
0 comments
Please sign in to leave a comment.