Forum Discussion

KatherineRam223's avatar
KatherineRam223
Community Member
4 years ago

Creating a Sorting Simulation

 So the sorting should work to the point that depending on the amount of options the user chooses it will sort them into the house with the highest points. I've used variables so when they get to the sorted page the house crest populates to take them to their common room. 

 

I am having a hard time with the variables because when they finish the quiz no crest populates. Please help.

3 Replies

  • Hi, Katherine.

    Thank you for sharing your .story file!

    The triggers you have set up to show the corresponding layer only work if the user chooses all the answers for that house (since there are only five questions and your trigger checks for values higher than 4):

    Windows 10 (1) 2022-05-11 at 1.18.11 PM

    My suggestion is first to decide how you want the logic to work. What happens if I answer the following:

    • 2 points for Ravenclaw
    • 2 points for Gryffindor
    • 1 point for Slytherin

    Which house should I be sorted into? Based on this logic, you'll be able to set up the triggers differently.

    I hope this helps!

    • KatherineRam223's avatar
      KatherineRam223
      Community Member

      Is there a way to make a trigger just auto choose which one has the highest score?

       

  • Hi, Katherine.

    You can certainly add conditions to your trigger to compare the variables:

    Windows 10 (1) 2022-05-11 at 3.03.49 PM

    However, you will still need to decide what happens when you have variables with the same values in the end. 

    I hope this helps!