Text depending on radiobutton response


Author
Message
Elina
Elina
Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)
Group: Forum Members
Posts: 3, Visits: 19
Great, thanks for the really fast reply! :)

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
You do

<block someblock>
/ onblockend = [values.me_points = block.someblock.totalcorrectcount]
...
</block>

Elina
Elina
Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)
Group: Forum Members
Posts: 3, Visits: 19
Thank you very much, that worked out perfectly! :)
One last question: If the participant's points depend on his achievement in another block, how do I put that?
<values>
/ me_points = 10
/ jennifer_points = 15
/ john_points = 5
/ matthew_points = 6
/ deduceamount = 10
</values> - See more at: http://www.millisecond.com/forums/Topic16254.aspx#sthash.6xwm3zx7.dpuf
<values>
/ me_points = 10
/ jennifer_points = 15
/ john_points = 5
/ matthew_points = 6
/ deduceamount = 10
</values> - See more at: http://www.millisecond.com/forums/Topic16254.aspx#sthash.6xwm3zx7.dpuf
<values>
/ me_points = 10
/ jennifer_points = 15
/ john_points = 5
/ matthew_points = 6
/ deduceamount = 10
</values> - See more at: http://www.millisecond.com/forums/Topic16254.aspx#sthash.6xwm3zx7.dpuf
<values>
/ me_points = 10
/ jennifer_points = 15
/ john_points = 5
/ matthew_points = 6
/ deduceamount = 10
</values> - See more at: http://www.millisecond.com/forums/Topic16254.aspx#sthash.6xwm3zx7.dpuf

<values>
/ me_points = block.blockname.totalcorrectcount
/ Jennifer_points = 15
...
/ deduceamount = 50
</values>

This was my idea, but it doesn't work. ;)
<values>
/ me_points = 10
/ jennifer_points = 15
/ john_points = 5
/ matthew_points = 6
/ deduceamount = 10
</values> - See more at: http://www.millisecond.com/forums/Topic16254.aspx#sthash.6xwm3zx7.dpuf
<values>
/ me_points = 10
/ jennifer_points = 15
/ john_points = 5
/ matthew_points = 6
/ deduceamount = 10
</values> - See more at: http://www.millisecond.com/forums/Topic16254.aspx#sthash.6xwm3zx7.dpuf

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
There should be no reason to "change" the text. It's preferable to use variables to keep track of the players' points and use simple math to adjust the amounts based on response:

<values>
/ me_points = 10
/ jennifer_points = 15
/ john_points = 5
/ matthew_points = 6
/ deduceamount = 10
</values>

<block myblock>
/ trials = [1-3=deducepointspage; 4=endpage]
</block>

<caption playerpoints>
/ caption = "Me: <%values.me_points%> points    Jennifer: <%values.jennifer_points%> points    John: <%values.john_points%> points    Matthew: <%values.matthew_points%> points"
</caption>

<radiobuttons deducepoints>
/ caption = "Deduce <%values.deduceamount%> points from"
/ options = ("Jennifer", "John", "Matthew")
</radiobuttons>

<surveypage deducepointspage>
/ ontrialend = [if (radiobuttons.deducepoints.response=="Jennifer") values.jennifer_points-=values.deduceamount; ]
/ ontrialend = [if (radiobuttons.deducepoints.response=="John") values.john_points-=values.deduceamount; ]
/ ontrialend = [if (radiobuttons.deducepoints.response=="Matthew") values.matthew_points-=values.deduceamount; ]
/ questions = [1=playerpoints; 2=deducepoints]
</surveypage>

<surveypage endpage>
/ questions = [1=playerpoints]
</surveypage>


Elina
Elina
Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)Partner Member (516 reputation)
Group: Forum Members
Posts: 3, Visits: 19
Hi,
I'm trying to do an Inquisit experiment where at some point the participant can decide whether he wants to discount points from one of his three ostensible partners. There is a text element where the participant can see everybody's points, like:

Me: 10 points    Jennifer: 15 points    John: 5 points    Matthew: 6 points

Then, there is a radiobutton asking if the participant wants to substract 10 points from one of his partners' accounts.
I dont know how I can make the tex change according to the radiobutton response...
I would be very grateful for any help! (And sorry for my bad English, I hope you understood what I meant...)
Best,
Elina

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search