Hello Everyone,
What I am aiming to do is have a stimulus first be presented for 350ms and then the presentation time updated by averaging with the participants reaction time to the stimulus. For example, Trial 1: Average(350ms, 247ms) = New stimulus duration time (298ms), Trial 2: Average(350ms, 247ms, 205ms) = New stimulus duration time (267ms), etc...
//////////////Here is the code that I have written so far//////////////////////////////////////////////////////
User Script:
Dim nRT As Summation
In-Line Code (Block Level):
Set nRT = New Summation
c.SetAttrib "MeanRT", 350
In-Line Code (Trial Level AFTER stimulus presentation):
nRT.AddObservation Stimulus.RT
c.SetAttrib "MeanRT", nRT.Mean
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The MeanRT attribute is what I have in place for the duration value for the stimulus. I have considered your previous warnings about creating a buffer between the updating function and added buffer stimuli and set the PreRelease to 0, but with no success. With all of my varied attempts I am either getting 0ms or 350ms stimulus duration times and never an average. I suspect I am not updating the attributes properly.
Please let me know if there is any other relevant information I can provide.
Thank you for your time,
Kipras