Millisecond Forums

Method to override / negate a trial response when a trialduration is set

https://forums.millisecond.com/Topic35801.aspx

By mdev762 - 11/28/2023

Hi,

I'm looking for options that will effectively negate a valid response given a second valid response for a given trial.

Thanks
By Dave - 11/28/2023

mdev762 - 11/28/2023
Hi,

I'm looking for options that will effectively negate a valid response given a second valid response for a given trial.

Thanks

Please give a concrete example of what you want to do, your description is unclear and ambiguous.
By mdev762 - 11/28/2023


<trial t>
/ validresponse = (50,57)
/ trialduration = 2500
/ branch = [
    if(trial.t.response == 50) trial.b
]
</trial>

Say the spacebar (57) is pressed at 500ms. I'm looking for a way that the branch logic could be executed if the "M" (50) key is pressed.

What I'm ultimately trying to achieve is that at any time during the experiment if the "M" key is pressed something should happen but generally want to maintain a trial duration of 2500ms.

I'll probably change the trialduration to a timeout and branch to another trial for  2000ms but just wondering if there is a simpler way as looking to reduce the complexity of the script.
By Dave - 11/29/2023

mdev762 - 11/29/2023

<trial t>
/ validresponse = (50,57)
/ trialduration = 2500
/ branch = [
    if(trial.t.response == 50) trial.b
]
</trial>

Say the spacebar (57) is pressed at 500ms. I'm looking for a way that the branch logic could be executed if the "M" (50) key is pressed.

What I'm ultimately trying to achieve is that at any time during the experiment if the "M" key is pressed something should happen but generally want to maintain a trial duration of 2500ms.

I'll probably change the trialduration to a timeout and branch to another trial for  2000ms but just wondering if there is a simpler way as looking to reduce the complexity of the script.

Still not clear enough. What do you want to happen, for example, if the M key is pressed first? Is it then supposed to be possible to override that, too, i.e. press the spacebar after, and thereby not execute the branch? Is the whole thing supposed to be restricted to two responses max or indefinitely many, until the end of the trial duration? Please spell out in detail how you want the trial to behave in every conceivable situation. Then I can give you an answer.