Adding variables from a pick many quiz

Hi all,

I'm trying to build an interactivity where users choose as many items as they want, and each of these items costs a certain value. These items are pictures.

I have set a variable "Choice", which has a different value depending on the picture. But what I'd really like to have is the total result, like a shopping basket, with the addition of all the choices the user does.

Is it possible to add the values and then show the user the total result?

I'd appreciate any comments on this.

Thank you very much in advance.

Belen

4 Replies
Belen Casado

Well, I found the answer myself...

I created a Pick Many Interaction.

I set different variables for the different choices (choice1 to choice6), that were set to zero.

I added one trigger per choice, that sets the choice to the value of the item (i.e. Choice 5 equal to 20,50).

Then I created several triggers using "adjust variable" and adding each variable to the first one when the user clicks Submit button:

This way, all the variables will be added, and only those that have a value will sum up.

It really works!

Regards,

Belen

Belen Casado

I wanted to upload the .story file and that's how I encountered another small detail that makes it work: the feedback option must be activated. I've been trying with different combinations and only when I returned to the original exercise I had built, I saw this slight difference that in fact was driving me crazy!

Please use it as you wish.

Belen Casado