Stimulus frames showing up when not called


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

Hello the code below works perfectly for my purposes but when I call blank more elements show up then I call. Namely the two options are visible although the instruction text does go away. Cant seem to figure out why this is. Have bolded what I assume should be only relevant sections.


Thanks for any help in advance.



**************************************************************************************************************


**************************************************************************************************************


                              Non Stationary Online


**************************************************************************************************************


**************************************************************************************************************



**************************************************************************************************************


**************************************************************************************************************


                                       SCRIPT INFO



**************************************************************************************************************


**************************************************************************************************************


                                    DEFAULT SCREEN SETTING


**************************************************************************************************************


**************************************************************************************************************


requires Inquisit 4.0.0.0



<defaults>


/ minimumversion = "4.0.0.0"


/ inputdevice = mouse


/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 0)


</defaults>



**************************************************************************************************************


**************************************************************************************************************


                                             VALUES


**************************************************************************************************************


**************************************************************************************************************


****************


****************


currenttotal:                     the amount of money currently owned


                                 startamount (default) = 0



<values>


/ currenttotal = 0


</values>



***************


the remaining parameters are updated automatically during runtime


***************



<values>


/ samples = 0


/ outcome = 0


/ optionselected = 0


/ option1selected = 0


/ option2selected = 0


/ o1a = 10


/ o1b = 1


/ o2a = 5


/ o2b = 4


/ p1 = 60


/ p2 = 50


/ tot = 0


/ side = round(rand(0,1))


/ max = 200


/ ran = 0


/ changer = rand(60,120)


/ changer2 = changer += 30


</values>




**************************************************************************************************************


**************************************************************************************************************


                                             DATA


**************************************************************************************************************


**************************************************************************************************************



********************


raw data


********************


<data>


/file = "nsfulldata.iqdat"


/ columns = [date, time, subject, values.optionselected, values.samples, response, latency, values.outcome]


/separatefiles = true


</data>



**************************************************************************************************************


**************************************************************************************************************


                                 INSTRUCTIONS ELEMENTS


**************************************************************************************************************


**************************************************************************************************************



****************************************************


NOTE: instructions can be changed here:



<item instructions>


/ 1 = "In this experiment you will be making multiple decisions between two possible options. Each option has different outcomes (cash amounts) that are possible and that occur at differing probabilities.



The possible outcomes and the probabilities of them occurring will not be stated. Instead, you will have to choose between the two options in order to get an idea for what outcomes are possible, and how likely they are to occur.



Specifically, you will click on an option and that option will then be played out. The outcome that occurs will be presented to you at the center of the screen. Your task is to maximize your total earnings, which will be displayed at all times so you can keep track of your progress.



Click ~"Start~" to begin."



/ 2 = "Pick an option to play it."



/ 3 = "Thank you for participating. Please press quit to exit."



</item>



****************************************************


<text osinstructions>


/ items = instructions


/ select = 1


/ position = (50%, 15%)


/ fontstyle = ("Arial", 4%)


/ size = (80%, 30%)


/ hjustify = left


/ valign = top


</text>



<trial instructions>


/ stimulusframes = [1=osinstructions, start]


/ validresponse = (start)


/ recorddata = false


</trial>



<block instructions>


/ trials = [1=instructions]


</block>



**************************************************************************************************************


**************************************************************************************************************


                                          STIMULI


**************************************************************************************************************


**************************************************************************************************************


<text totals>


/ items = ("Total amount earned: <% values.tot %> ")


/ position = (50%, 20%)


/ fontstyle = ("Arial", 2%)


/ erase = false


</text>



<text start>


/ items = ("Start")


/ position = (50%, 90%)


/ fontstyle = ("Arial", 3%, false, false, true, false, 5, 0)


/ txcolor = blue


</text>



<text outcomes>


/ items = ("£<% values.outcome%>")


/ position = (50%, 50%)


/ valign = top


/ txcolor = black


</text>




<text selectinstructions>


/ items = instructions


/ select = 2


/ position = (50%, 10%)


</text>



<text end>


/ items = instructions


/ select = 3


/ position = (50%, 10%)


</text>



<text quit>


/ items = ("Quit")


/ position = (50%, 50%)


</text>



<text continue>


/ items = ("Continue")


/ position = (50%, 50%)


</text>



<text option1>


/ items = ("


 Option A 


")


/ position = (25%, 50%)


/ valign = bottom


/ erase = false


</text>




<text option2>


/ items = ("


 Option B 


")


/ position = (75,50%)


 /valign = bottom


/ erase = false


</text>



<textbox age>


/ caption = "Please enter your age."


/ mask=positiveinteger


/ range = (18, 100)


/required = true


/ position = (5%, 10%)


</textbox>



<textbox gender>


/ caption= "Please enter your gender."


/required = true


/ position = (5%, 30%)


</textbox>



<textbox occup>


/ caption= "Please enter your occupation and number of years worked seperated by a comma (e.g., Accountant, 10)."


/required = true


/ position = (5%, 50%)


</textbox>




<textbox pay>


/ caption="Please indicate your yearly gross income including bonuses and revenue from personal investments."


/required = true


/ position = (5%, 70%)


</textbox>



**************************************************************************************************************


**************************************************************************************************************


                                          MAIN TRIALS


**************************************************************************************************************


**************************************************************************************************************


<trial os>


/ stimulusframes = [1=  option1, option2, totals, outcomes, selectinstructions]


/ validresponse = (option1, option2)


/ ontrialend = [values.samples += 1]


/ ontrialend = [if (values.samples >= values.changer && values.samples <= values.changer2) {values.p1 -= 1;}]


/ ontrialend = [values.ran = round(rand(1,100))]


/ ontrialend = [ if (trial.os.response == "option1" && values.ran <= values.p1 ) {values.outcome=values.o1a;}]


/ ontrialend = [ if (trial.os.response == "option1" && values.ran>= values.p1 ) {values.outcome=values.o1b;}]


/ ontrialend = [ if (trial.os.response == "option2" && values.ran <= values.p2 ) {values.outcome=values.o2a;}]


/ ontrialend = [ if (trial.os.response == "option2" && values.ran >= values.p2 ) {values.outcome=values.o2b;}]


/ ontrialend = [values.tot += values.outcome]


</trial>



<trial blank>


/ stimulusframes = [1=totals, outcomes]


/ trialduration = 250 


</trial>



<trial exit>


/ stimulusframes = [1=end, quit]


/ validresponse = (quit)


</trial>






<surveypage demographics>


/ questions = [1=age, gender, occup, pay]


/ showpagenumbers = false


/ nextbuttonposition = (90%, 90%) 


/ nextlabel = "Proceed"


</surveypage>




**************************************************************************************************************



**************************************************************************************************************


<block demo>


/ trials = [1 = demographics;]


</block>




<block os>


/ trials = [1 = os; 2 = blank;]


</block>



<block quit>


/ trials = [1 = exit;]


</block>



**************************************************************************************************************


**************************************************************************************************************


                                          EXPERIMENT


**************************************************************************************************************


**************************************************************************************************************


<expt main>


/ blocks = [1 = demo; 2=instructions; 3-202=os; 203=quit;]


</expt>



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

Hello the code below works perfectly for my purposes but when I call blank more elements show up then I call. Namely the two options are visible although the instruction text does go away. Cant seem to figure out why this is. Have bolded what I assume should be only relevant sectio


Actually no more elements show up than you called. They almost certainly are remainders of stimuli from any *previous* trial, because the respective stimulus elements are set to /erase=false. You'll want to overwrite them (i.e. actively "erase") using a properly set up <shape> in your <trial blank>. You will find this covered in the "How to erase stimuli" topic in the documentation.


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 just had to delete the erase=false part which had carried over from copy and pasting the example, works now. 


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search