OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): v2021.1.4
Hi everyone,
I’m new to PsychoPy and don’t have any programming experience so my problem might be very easy to solve but I just can’t figure it out and start feeling desperate. I’m thankful for every input and help I could get!
What are you trying to achieve?:
I’m doing a color-shape shifting task. The participants are presented with four different stimuli. Depending on a cue they have to decide if the presented stimulus is red vs. green or triangle vs. rectangle. If their response is incorrect I want them to get a (preferably short buzz sound, but I decided to try it first with a visual word feedback because I’m more familiar with the text component) feedback before the next stimulus. If their response is correct the next stimulus should start without any feedback. This selective feedback is the problem I couldn’t solve.
What did you try to make it work?:
I had no problem with getting a feedback for both (negative and positive) response types by introducing a code component (“FeedbackCode1”) with an if/else statement. Then I tried to simply reduce the duration of the positive feedback to 0.0 seconds but i couldn’t find a suitable option for this in the feedback text component (“FeedbackText1W”). I don’t know if this is even possible. Just for further explanations the name of the keyboard component is “AntwortNuFaUe”. Afterwards I tried to define two different variables in the code component like this:
if AntwortNuFaUe.corr:
Ausgabe1 = “korrekt”
else:
Ausgabe2 = “falsch”
I created two different text components for “Ausgabe1” and “Ausgabe2” and reduced the duration of the text component with “Ausgabe1” to 0.0 seconds but the experiment crashed with the first response.
Next I tried this:
if not AntwortNuFaUe.corr:
Ausgabe1 = “falsch”
This option again terribly failed:
If the first response was correct the experiment crashed:
NameError: name ‘Ausgabe1’ is not defined
Experiment ended.
If the first response was false, the experiment continued and I got the negative feedback for every response (incorrect and correct ones).
There are some screenshots of my last attempt for visualization.
Please help. I’m lost