Customise trigger value in a loop
I am designing an EEG experiment on OpenSesame, and I am having trouble with getting some of my triggers to send.
What I am trying to do is send a trigger after a rating scale value has been provided, and would like the value of the trigger to depend on the value that was provided in the rating scale. The issue seems to be that the rating scale value isn't saving, meaning that the trigger equation is incomplete and the trigger doesn't get sent.
This is all happening within a sequence, where music is being played, followed by the rating scale, followed by a trigger indicating that a scale had just been completed
Here is the inline script code I are using to send the trigger:
global io var.condition = self.get("condition") var.rating_Q1 = self.get("rating_Q1") trigger= var.condition + 3 + var.rating_Q1 port = 0x378 pport.Out32(port, trigger)
'condition' is a predefined variable whose value changes depending on which condition it loops through from an Excel sheet (this works fine).
The variable 'rating_Q1' doesn't appear to be saving the value provided in the rating scale, and instead appears as a NoneType. It was defined in a form base plugin as follows:
widget 0 5 6 1 rating_scale nodes="1;2;3;4;5;6" var=rating_Q1
Does anyone know why the rating variable is not saving the value? Is it because everything is happening within a loop sequence?
I hope this question makes sense. I'm happy to provide more information
I am using a Windows computer, OpenSesame version 3.3.8.
Thanks in advance!