Removing Valid Response


Author
Message
nashby
nashby
Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)
Group: Forum Members
Posts: 78, Visits: 159
So I have a problem I have three valid responses in a given trial. However, if they select from one of the options 100 times that option needs to go away (not be show) and no longer be a valid response (not be clickable).

In the code below I get the options to disappear but i cannot figure out how to make them to also no longer be selectable (i.e., even though I can't see them I can still click them and move through the trials). Any thoughts on how to fix this?

<trial mytrial1>
/ stimulusframes = [1= InTaskInstructions ; 2= Play; 3= LabelA; 4= LabelB; 5=  Loutcome; 6 = ROutcome;]
/ validresponse = (LabelA, LabelB, Play)
/ inputdevice = mouse
/ ontrialend = [values.samples += 1]
/ ontrialbegin = [values.ran = round(rand(1,100))]
/ ontrialbegin = [if (values.samplesl >= 100) {trial.mytrial1.removestimulusframe(3);trial.mytrial1.removestimulusframe(5);}]
/ ontrialbegin = [if (values.samplesr >= 100) {trial.mytrial1.removestimulusframe(4);trial.mytrial1.removestimulusframe(6);}]

/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran <= values.pw1a && values.side  <= 50) {values.outcome=values.ow1a; values.spicked = 0; }]
/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran > values.pw1a && values.ran <= values.pw1b && values.side  <= 50) {values.outcome=values.ow1b; values.spicked = 0; }]
/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran > values.pw1b && values.side  <= 50) {values.outcome=values.ow1c; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran <= values.pn1a && values.side  <= 50) {values.outcome=values.on1a; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran > values.pn1a && values.ran <= values.pn1b && values.side  <= 50) {values.outcome=values.on1b; values.spicked = 1; }]
/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran > values.pn1b && values.side  <= 50) {values.outcome=values.on1c; values.spicked = 1;}]


/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran <= values.pw1a && values.side  > 50) {values.outcome=values.ow1a; values.spicked = 1; }]
/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran > values.pw1a && values.ran <= values.pw1b && values.side  > 50) {values.outcome=values.ow1b; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran > values.pw1b && values.side  > 50) {values.outcome=values.ow1c; values.spicked = 1;  }]
/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran <= values.pn1a && values.side  > 50) {values.outcome=values.on1a; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran > values.pn1a && values.ran <= values.pn1b && values.side  > 50) {values.outcome=values.on1b; ; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran > values.pn1b && values.side  > 50) {values.outcome=values.on1c; values.spicked = 0;}]


/ ontrialend = [if (trial.mytrial1.response == "LabelA") {text.Loutcome = "<% values.outcome %> pts."; text.routcome = "  "; values.samplesl += 1;}]
/ ontrialend = [if (trial.mytrial1.response == "LabelB") {text.Routcome = "<% values.outcome %> pts."; text.loutcome = "  "; values.samplesr += 1;}]
</trial>


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K
You'll want to use /isvalidresponse to invalidate any previously selected response across trials. That, of course, requires you to store those previous responses somewhere (e.g. in a <values> entry). If you want a concrete example, you can take a look at the "Information Sampling Task" or "Columbia Card Task" scripts available via the Task Library. They do precisely that.
nashby
nashby
Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)
Group: Forum Members
Posts: 78, Visits: 159
Thanks this does it. 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search