Experiment(){
Context(){
AssignmentGroup(){
ExperimentName = "Response Position Recording";
SubjectCode = "pxlab";
TrialFactor = 2;
new targetPosition = arrayOf2(Trial.SimpleDisk.LocationX, Trial.SimpleDisk.LocationY);
}
Session(){
Instruction(){
Text = ["Hit the Target", " ", "When a dot shows up on the screen then you should point at it with the mouse and press a button.", " ", "Press any key to start!"];
}
}
SessionEnd(){
SessionEndMessage(){
}
}
Trial( TrialCounter, SimpleDisk.Color, SimpleDisk.LocationX, SimpleDisk.LocationY, SimpleDisk.ResponseTime, SimpleDisk.ResponsePosition, Feedback.Response){
RandomGenerator:X(){
DistributionType = de.pxlab.pxl.RandomGeneratorCodes.EQUAL_DISTRIBUTION_INT;
LowerLimit = -300;
UpperLimit = 300;
}
RandomGenerator:Y(){
DistributionType = de.pxlab.pxl.RandomGeneratorCodes.EQUAL_DISTRIBUTION_INT;
LowerLimit = -300;
UpperLimit = 300;
}
SimpleDisk(){
Timer = de.pxlab.pxl.TimerCodes.RESPONSE_TIMER;
Size = 100;
LocationX = Trial.RandomGenerator:X.ResponseCode;
LocationY = Trial.RandomGenerator:Y.ResponseCode;
}
Feedback(){
Evaluation = de.pxlab.pxl.EvaluationCodes.POSITION;
ResponseParameter = "Trial.SimpleDisk.ResponsePosition";
TargetParameter = "targetPosition";
CorrectCode = 50;
CorrectText = "Hit!\n \nCenter Distance: %Trial.Feedback.Response@i% Pixels\nTime: %Trial.SimpleDisk.ResponseTime@i% ms";
FalseText = "Miss!";
Visible = 1;
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 1200;
}
}
// Command line assignments
AssignmentGroup();
}
Procedure(){
Session(){
Block(){
Trial( ?, LightGray, ?, ?, ?, ?, ?);
Trial( ?, Red, ?, ?, ?, ?, ?);
Trial( ?, Green, ?, ?, ?, ?, ?);
Trial( ?, Blue, ?, ?, ?, ?, ?);
Trial( ?, Yellow, ?, ?, ?, ?, ?);
}
}
}
}