Code to Randomize Stimuli per Trial (Balloon Analogue Risk Task)


Author
Message
Marusil2yada
Marusil2yada
Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)
Group: Forum Members
Posts: 5, Visits: 7
Hi everyone,

I once asked this question in the Inquisit 6 forum, but I am asking again because I had to make it in Inquisit 5, which our lab computer has.

I'm working on a project involving the Balloon Analogue Risk Task (BART), and I need some help with editing the code. The original task involves a red balloon that participants inflate to earn money, risking it popping. In my version, I want to introduce a twist: the balloon's color should change randomly at the start of each of the 30 trials.

I have six different balloon images and have figured out how to integrate them into the code. However, my current challenge is that the balloon's type changes with every press of the "pump up" button. I need the balloon's type (color) to remain constant throughout a single trial and only change when a new trial begins.

Could anyone guide me on how to modify the code to achieve this? I have attached the code file for reference.

Thank you in advance for your assistance!


Attachments
bart.iqx (118 views, 30.00 KB)
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
Marusil2yada - 2/22/2024
Hi everyone,

I once asked this question in the Inquisit 6 forum, but I am asking again because I had to make it in Inquisit 5, which our lab computer has.

I'm working on a project involving the Balloon Analogue Risk Task (BART), and I need some help with editing the code. The original task involves a red balloon that participants inflate to earn money, risking it popping. In my version, I want to introduce a twist: the balloon's color should change randomly at the start of each of the 30 trials.

I have six different balloon images and have figured out how to integrate them into the code. However, my current challenge is that the balloon's type changes with every press of the "pump up" button. I need the balloon's type (color) to remain constant throughout a single trial and only change when a new trial begins.

Could anyone guide me on how to modify the code to achieve this? I have attached the code file for reference.

Thank you in advance for your assistance!


The solution is the same
Marusil2yada
Marusil2yada
Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)
Group: Forum Members
Posts: 5, Visits: 7
Dave - 2/22/2024
Marusil2yada - 2/22/2024
Hi everyone,

I once asked this question in the Inquisit 6 forum, but I am asking again because I had to make it in Inquisit 5, which our lab computer has.

I'm working on a project involving the Balloon Analogue Risk Task (BART), and I need some help with editing the code. The original task involves a red balloon that participants inflate to earn money, risking it popping. In my version, I want to introduce a twist: the balloon's color should change randomly at the start of each of the 30 trials.

I have six different balloon images and have figured out how to integrate them into the code. However, my current challenge is that the balloon's type changes with every press of the "pump up" button. I need the balloon's type (color) to remain constant throughout a single trial and only change when a new trial begins.

Could anyone guide me on how to modify the code to achieve this? I have attached the code file for reference.

Thank you in advance for your assistance!


The solution is the same

Hi Dave,

Thank you for your reply.
I tried so, but I consistently get these errors:



I think this is a code language difference between inquisit 5 and 6, maybe?


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
Marusil2yada - 2/23/2024
Dave - 2/22/2024
Marusil2yada - 2/22/2024
Hi everyone,

I once asked this question in the Inquisit 6 forum, but I am asking again because I had to make it in Inquisit 5, which our lab computer has.

I'm working on a project involving the Balloon Analogue Risk Task (BART), and I need some help with editing the code. The original task involves a red balloon that participants inflate to earn money, risking it popping. In my version, I want to introduce a twist: the balloon's color should change randomly at the start of each of the 30 trials.

I have six different balloon images and have figured out how to integrate them into the code. However, my current challenge is that the balloon's type changes with every press of the "pump up" button. I need the balloon's type (color) to remain constant throughout a single trial and only change when a new trial begins.

Could anyone guide me on how to modify the code to achieve this? I have attached the code file for reference.

Thank you in advance for your assistance!


The solution is the same

Hi Dave,

Thank you for your reply.
I tried so, but I consistently get these errors:



I think this is a code language difference between inquisit 5 and 6, maybe?


You need to lose the inline comments. Inquisit 5 doesn't allow for inline comments.

The scalingFactor value isn't in and doesn't apply to the Inquisit 5 BART script. You shouldn't simply copy and paste things, you should try to understand how and why the solution I explained to you works when you asked the question for the 1st time and then apply that to the Inquisit 5 script
Edited 10 Months Ago by Dave
Marusil2yada
Marusil2yada
Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)Associate Member (70 reputation)
Group: Forum Members
Posts: 5, Visits: 7
Dave - 2/23/2024
Marusil2yada - 2/23/2024
Dave - 2/22/2024
Marusil2yada - 2/22/2024
Hi everyone,

I once asked this question in the Inquisit 6 forum, but I am asking again because I had to make it in Inquisit 5, which our lab computer has.

I'm working on a project involving the Balloon Analogue Risk Task (BART), and I need some help with editing the code. The original task involves a red balloon that participants inflate to earn money, risking it popping. In my version, I want to introduce a twist: the balloon's color should change randomly at the start of each of the 30 trials.

I have six different balloon images and have figured out how to integrate them into the code. However, my current challenge is that the balloon's type changes with every press of the "pump up" button. I need the balloon's type (color) to remain constant throughout a single trial and only change when a new trial begins.

Could anyone guide me on how to modify the code to achieve this? I have attached the code file for reference.

Thank you in advance for your assistance!


The solution is the same

Hi Dave,

Thank you for your reply.
I tried so, but I consistently get these errors:



I think this is a code language difference between inquisit 5 and 6, maybe?


You need to lose the inline comments. Inquisit 5 doesn't allow for inline comments

Awesome! It works now. Thank you so much for helping me multiple times Dave!

Hope you have a great evening :)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search