Keyboard response and right feedback on the screen
Hey there!
I need some help with coding!
I am programming a task (the Rock-Paper-Scissors game) and I cannot find the right inline code to run the task correctly.
If I press 1, I want the image of Rock to appear on the screen; If I press 2, I want the Paper to show up; and finally, if I press 3, I need Scissors to appear on the monitor. I tried several codes and none of them work.
The participant will be playing against the computer.
So, basically, it will depend on the participant's choice, since the computer's response is randomized.
Furthermore, I need a code to them show the result on the screen (i.e., whether it is a Win, a Draw or a Loss). Again, it will depend on the first choice made combined with what the computer has chosen.
I am using E-prime (version 2.0).
Thank you in advance! I truly hope there is an easy solution.
P.S.:
There is 9 condition possible:
Rock (press 1 by participant) and Rock (by computer) = Draw
Rock (press 1 by participant) and Paper (by computer) = Lose
Rock (press 1 by participant) and Scissors (by computer) = Win
Paper (press 2 by participant) and Rock (by computer) = Win
Paper (press 2 by participant) and Paper (by computer) = Draw
Paper (press 2 by participant) and Scissors (by computer) = Lose
Scissors (press 3 by participant) and Rock (by computer) = Lose
Scissors (press 3 by participant) and Paper (by computer) = Win
Scissors (press 3 by participant) and Scissors (by computer) = Draw
Joana
Comments
Dear Joana,
This is the OpenSesame forum:
if you are using E-prime, this might not be correct forum.
If you are using OpenSesame, could you specify your problem? Which part of your experiment does not work?
Greetz
Stephan
PS: Nice task by the way
Dear Stephan,
Thank you so much for your feedback. I am aware this is not the correct forum...but I am desperate to find a solution!
I know that the codes I am suppose to use are VB and I was hoping someone could help me with that (since I am not acquainted in the field of programming).
The task runs perfectly, however, it does it on its own (which I don't want to, i.e., I want the participants to press the key they want - 1, 2 or 3 - and then make the software trigger the right response*).
1) After pressing the key they want, a picture showing their choice combined with the computer appears on the screen (so I need to match the pressed key with the right image);
2) Finally, the result saying whether it is a Win, Draw or Lose will appear as a consequence of the first step.
Joana
P.S.: Thanks!