Hi There,
I use IGT script for my experiment and want to add sound elements for punishment and rewards. I added sound elements into the script:
<sound rewardsound>
/ items = ("chacing.wav")
</sound>
<sound punishmentsound>
/ items = ("failbuzz.wav")
</sound>
When there is no loss in the end of the trial I want the rewardsound to play and when there is a loss I want the punishmentsound to play. SO I've been trying some ontrialend conditional statements, but so far I haven't succeed to hear any sound! Here is one of my script modification trial:
<trial igt>
/ ontrialbegin = [picture.deck1.item.1 = "deck.jpg"; picture.deck2.item.1 = "deck.jpg"; picture.deck3.item.1 = "deck.jpg"; picture.deck4.item.1 = "deck.jpg";]
/ stimulusframes = [1=deck1, deck2, deck3, deck4, deck1label, deck2label, deck3label, deck4label, selectinstructions]
/ validresponse = (deck1, deck2, deck3, deck4)
/ branch = [if (true) trial.igtfeedback]
/ ontrialend = [values.cardsselected += 1]
/ ontrialend = [ if (trial.igt.response == "deck1") {picture.deck1.item.1 = "deckon.jpg"; text.gain.hposition=picture.deck1.hposition; text.loss.hposition=picture.deck1.hposition; values.gain=100; values.loss=expressions.getlossdeck1; values.previoustotal=values.currenttotal; values.currenttotal = values.currenttotal+values.gain-values.loss}]
/ ontrialend = [ if (trial.igt.response == "deck2") {picture.deck2.item.1 = "deckon.jpg"; text.gain.hposition=picture.deck2.hposition; text.loss.hposition=picture.deck2.hposition; values.gain=100; values.loss=expressions.getlossdeck2; values.previoustotal=values.currenttotal; values.currenttotal = values.currenttotal+values.gain-values.loss}]
/ ontrialend = [ if (trial.igt.response == "deck3") {picture.deck3.item.1 = "deckon.jpg"; text.gain.hposition=picture.deck3.hposition; text.loss.hposition=picture.deck3.hposition; values.gain=50; values.loss=expressions.getlossdeck3; values.previoustotal=values.currenttotal; values.currenttotal = values.currenttotal+values.gain-values.loss}]
/ ontrialend = [ if (trial.igt.response == "deck4") {picture.deck4.item.1 = "deckon.jpg"; text.gain.hposition=picture.deck4.hposition; text.loss.hposition=picture.deck4.hposition; values.gain=50; values.loss=expressions.getlossdeck4; values.previoustotal=values.currenttotal; values.currenttotal = values.currenttotal+values.gain-values.loss}]
/ ontrialend = [ if (values.loss == 0) sound.rewardsound.item =true]
/ ontrialend = [ if (values.loss != 0) sound.punishmentsound.item=true]
</trial>
I guess my second statements are not right? I couldn't really get help from the help buton on this. Could somebody please show me what I am doing wrong?
thanks in advance