Millisecond Forums

Can a survey response be used to trigger display logic in a trial or block

https://forums.millisecond.com/Topic22883.aspx

By Marguerite - 11/17/2017

Hello 

I'm trying to come up with an interactive "game" where participants are able to vote off other "players". The other players are all pre-recorded, so what I would like is for the video that displays which player gets voted off matches who the participant voted for in a previous round. So in the attached inquisit script, the vote in block8 would determine which video plays in block9.

Is there a way to create if-then statements for the trials or blocks?

Kind Regards

By Dave - 11/17/2017

Marguerite - Friday, November 17, 2017
Hello 

I'm trying to come up with an interactive "game" where participants are able to vote off other "players". The other players are all pre-recorded, so what I would like is for the video that displays which player gets voted off matches who the participant voted for in a previous round. So in the attached inquisit script, the vote in block8 would determine which video plays in block9.

Is there a way to create if-then statements for the trials or blocks?

Kind Regards


Sure. You need videos that correspond to all possible vote results. Define those as <video round1votes> items.

<video round1votes>
/ items = ("player1out.mp4", "player2out.mp4", "player3out.mp4", ...)
/ select = values.outvoted
/ playthrough = true
/ position = (50, 50)
</video>

Set up a global variable

<values>
/ outvoted = 1
</values>

and use that variable for the video selection. Finally, set that variable to the proper value depending on the response in the <surveypage>:

<surveypage vote1>
...

/ ontrialend = [ if (checkboxes.pvote1.checked.1 == true) values.outvoted = 1]
/ ontrialend = [ if (checkboxes.pvote1.checked.2 == true) values.outvoted = 2 ]
...
</surveypage>

By Marguerite - 11/22/2017

Dave - Friday, November 17, 2017
Marguerite - Friday, November 17, 2017
Hello 

I'm trying to come up with an interactive "game" where participants are able to vote off other "players". The other players are all pre-recorded, so what I would like is for the video that displays which player gets voted off matches who the participant voted for in a previous round. So in the attached inquisit script, the vote in block8 would determine which video plays in block9.

Is there a way to create if-then statements for the trials or blocks?

Kind Regards


Sure. You need videos that correspond to all possible vote results. Define those as <video round1votes> items.

<video round1votes>
/ items = ("player1out.mp4", "player2out.mp4", "player3out.mp4", ...)
/ select = values.outvoted
/ playthrough = true
/ position = (50, 50)
</video>

Set up a global variable

<values>
/ outvoted = 1
</values>

and use that variable for the video selection. Finally, set that variable to the proper value depending on the response in the <surveypage>:

<surveypage vote1>
...

/ ontrialend = [ if (checkboxes.pvote1.checked.1 == true) values.outvoted = 1]
/ ontrialend = [ if (checkboxes.pvote1.checked.2 == true) values.outvoted = 2 ]
...
</surveypage>


This is great, thank you. I was wondering how we could program a cumulative effect for this. 

So if we have 3 rounds, we would want the options revealed in each subsequent round to reflect each of the earlier decisions. Could this be done with something like

<surveypage vote3>
...
/ ontrialend = [ if (checkboxes.pvote1.checked.1 == true) & (checkboxes.pvote2.checked.1 == true) values.outvoted3 = 1]
/ ontrialend = [if (checkboxes.pvote1.checked.1 == true) & (checkboxes.pvote2.checked.2 == true) values.outvoted3 = 2]
...
</surveypage>
By Dave - 11/23/2017

Marguerite - Thursday, November 23, 2017
Dave - Friday, November 17, 2017
Marguerite - Friday, November 17, 2017
Hello 

I'm trying to come up with an interactive "game" where participants are able to vote off other "players". The other players are all pre-recorded, so what I would like is for the video that displays which player gets voted off matches who the participant voted for in a previous round. So in the attached inquisit script, the vote in block8 would determine which video plays in block9.

Is there a way to create if-then statements for the trials or blocks?

Kind Regards


Sure. You need videos that correspond to all possible vote results. Define those as <video round1votes> items.

<video round1votes>
/ items = ("player1out.mp4", "player2out.mp4", "player3out.mp4", ...)
/ select = values.outvoted
/ playthrough = true
/ position = (50, 50)
</video>

Set up a global variable

<values>
/ outvoted = 1
</values>

and use that variable for the video selection. Finally, set that variable to the proper value depending on the response in the <surveypage>:

<surveypage vote1>
...

/ ontrialend = [ if (checkboxes.pvote1.checked.1 == true) values.outvoted = 1]
/ ontrialend = [ if (checkboxes.pvote1.checked.2 == true) values.outvoted = 2 ]
...
</surveypage>


This is great, thank you. I was wondering how we could program a cumulative effect for this. 

So if we have 3 rounds, we would want the options revealed in each subsequent round to reflect each of the earlier decisions. Could this be done with something like

<surveypage vote3>
...
/ ontrialend = [ if (checkboxes.pvote1.checked.1 == true) & (checkboxes.pvote2.checked.1 == true) values.outvoted3 = 1]
/ ontrialend = [if (checkboxes.pvote1.checked.1 == true) & (checkboxes.pvote2.checked.2 == true) values.outvoted3 = 2]
...
</surveypage>

Yes, you can absolutely do this, although I'm not sure why you would need separate variables for each round. You should be able to simply use the same ones (values.outvoted) for each round.
By Marguerite - 11/23/2017

Dave - Thursday, November 23, 2017
Marguerite - Thursday, November 23, 2017
Dave - Friday, November 17, 2017
Marguerite - Friday, November 17, 2017
Hello 

I'm trying to come up with an interactive "game" where participants are able to vote off other "players". The other players are all pre-recorded, so what I would like is for the video that displays which player gets voted off matches who the participant voted for in a previous round. So in the attached inquisit script, the vote in block8 would determine which video plays in block9.

Is there a way to create if-then statements for the trials or blocks?

Kind Regards


Sure. You need videos that correspond to all possible vote results. Define those as <video round1votes> items.

<video round1votes>
/ items = ("player1out.mp4", "player2out.mp4", "player3out.mp4", ...)
/ select = values.outvoted
/ playthrough = true
/ position = (50, 50)
</video>

Set up a global variable

<values>
/ outvoted = 1
</values>

and use that variable for the video selection. Finally, set that variable to the proper value depending on the response in the <surveypage>:

<surveypage vote1>
...

/ ontrialend = [ if (checkboxes.pvote1.checked.1 == true) values.outvoted = 1]
/ ontrialend = [ if (checkboxes.pvote1.checked.2 == true) values.outvoted = 2 ]
...
</surveypage>


This is great, thank you. I was wondering how we could program a cumulative effect for this. 

So if we have 3 rounds, we would want the options revealed in each subsequent round to reflect each of the earlier decisions. Could this be done with something like

<surveypage vote3>
...
/ ontrialend = [ if (checkboxes.pvote1.checked.1 == true) & (checkboxes.pvote2.checked.1 == true) values.outvoted3 = 1]
/ ontrialend = [if (checkboxes.pvote1.checked.1 == true) & (checkboxes.pvote2.checked.2 == true) values.outvoted3 = 2]
...
</surveypage>

Yes, you can absolutely do this, although I'm not sure why you would need separate variables for each round. You should be able to simply use the same ones (values.outvoted) for each round.

Thanks, very helpful.