error message superimposed onto trial


Author
Message
charlottebooth
charlottebooth
Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)
Group: Forum Members
Posts: 45, Visits: 249
Hi there,
I was wondering if there is some way to superimpose my error message onto the trial stimuli when an incorrect response is made? At the moment the error message is show for 500ms in another trial-type page.

<trial mytrial>
/iscorrectresponse = [(picture.targets.currentitemnumber==2&&trial.old.response==51) || (picture.targets.currentitemnumber==1&&trial.old.response==52)]
/validresponse = (51,52)
/errormessage = true(error,500)
</trial>


<text error>
/ items = ("ERROR")
/font = ("Arial", 32, 700, 0, 34)
/ color = (red)
/ position =(50,50)
</text>

Many thanks,

Charlotte :)



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: 104K
> I was wondering if there is some way to superimpose my error message onto the trial stimuli when an incorrect response is
> made? At the moment the error message is show for 500ms in another trial-type page.

I frankly have no idea what that's supposed to mean. Could you elaborate, please? I see a single <trial> element that displays an error message in the center of the screen. That <trial> does not appear to display any other stimuli that the message could possibly be imposed on. I'm also not sure what exactly you mean by "trial-type page".

To be clear, if you have a <trial> display a stimulus and have the *same* <trial> element also display the error message, you can of course superimpose it on the stimulus.

<block someblock>
/ trials = [1-4=sometrial]
</block>

<trial sometrial>
/ stimulusframes = [1=somestimulus]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ errormessage = (errormsg, 500)
</trial>

<text somestimulus>
/ items = ("Item 1", "Item 2", "Item 3", "Item 4")
/ erase = false
/ size = (20%,20%)
/ position = (50%, 40%)
/ txcolor = (black)
/ hjustify = center
/ vjustify = center
</text>

<text errormsg>
/ items = ("X")
/ size = (20%,20%)
/ position = (50%, 40%)
/ txcolor = (red)
/ txbgcolor = (transparent)
/ hjustify = center
/ vjustify = center
</text>

charlottebooth
charlottebooth
Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)
Group: Forum Members
Posts: 45, Visits: 249
Hi , Sorry for the seemingly stupid question! I didn't include most of my script because it is way too long. I tried your script and it does indeed work how I would like - but when I amend my own script it doesn't work! I set all of my stimuli to /erase=false and my error message to /txbg=(transparent). And while this does superimpose the error message - it also doesn't clear the stimuli at all for the next trials so I end up with a huge mess of stimuli building up over the experiment. Clearly I cannot set my stimuli to /erase=false.
Thanks anyway!
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: 104K
Yes, you absolutely *can* set the stimuli to /erase=false. All you need to do is to leave the error stimulus itself set to /erase=true and size it such that it clears the other stimuli once the error stimulus gets erased.

Alternatively, you can clear them by overwriting them with a blank <shape> or other stimulus displayed via /stimulusframes or -times at whatever time you want/need.

<block someblock>
/ trials = [1-4=sometrial]
</block>

<trial sometrial>
/ stimulusframes = [1=blank, somestimulus]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ errormessage = (errormsg, 500)
</trial>

<text somestimulus>
/ items = ("A", "BB", "CCC", "DDDD")
/ erase = false
/ size = (20%,20%)
/ position = (50%, 40%)
/ txcolor = (black)
/ hjustify = center
/ vjustify = center
</text>

<text errormsg>
/ items = ("X")
/ size = (20%,20%)
/ position = (50%, 40%)
/ txcolor = (red)
/ txbgcolor = (transparent)
/ hjustify = center
/ vjustify = center
</text>

<shape blank>
/ shape = rectangle
/ erase = false
/ color = (white)
/ size = (100%, 100%)
</shape>



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search