Forum Discussion

CharlotteCoo563's avatar
CharlotteCoo563
Community Member
12 days ago

Change a button from hidden to normal when the state of at least TWO other objects change

Hi there. I am trying to develop a slide  (I'm calling it slide 1 here) that has 6 images on it. Each image takes the user to a different slide with a unique freeform quiz question on it. Once they've answered it they then go back to slide 1. I want the user to be able to move on from this interaction ONLY when they have picked at least two of the images on slide 1 and answered the associated quiz question. I don't mind if they try more than two, I just don't want them to try none or 1.

I have created a 'Next' button on slide 1 with initial state 'hidden', and I want to change that state to 'normal' when the state of at least two the images is 'visited' (ie at least two quiz questions have been answered). But it only seems to be possible to set the state change to happen when ALL, AT LEAST ONE, or NONE of the image states is visited. 

Does anyone know a way round this?

  • Use a number variable to track user interaction and increment it by 1 only when the learner clicks an image for the first time. This ensures the learner interacts with at least two unique images.

    To achieve this, modify the triggers as follows (example for three images, but the same concept applies to more):

    Adding 1 to the count variable when the user clicks an image could increment the value every time the image is clicked. To avoid this and ensure the count increments only once per image, additional conditions or variables would be needed.

    However, a simpler and more efficient approach is to add 1 to the count when the state of an image is set to Visited. This ensures the action is executed only once, as the Visited state is triggered just once per object (unless the slide properties for Slide 1 are set to "Reset to initial state.")

    Attached is the .story file for reference. 

     

  • You could use a number variable to count how many items have been selected, and then change your next button to normal based on the value of that number.

  • Nedim's avatar
    Nedim
    Community Member

    Use a number variable to track user interaction and increment it by 1 only when the learner clicks an image for the first time. This ensures the learner interacts with at least two unique images.

    To achieve this, modify the triggers as follows (example for three images, but the same concept applies to more):

    Adding 1 to the count variable when the user clicks an image could increment the value every time the image is clicked. To avoid this and ensure the count increments only once per image, additional conditions or variables would be needed.

    However, a simpler and more efficient approach is to add 1 to the count when the state of an image is set to Visited. This ensures the action is executed only once, as the Visited state is triggered just once per object (unless the slide properties for Slide 1 are set to "Reset to initial state.")

    Attached is the .story file for reference. 

     

  • Thank you so much RonPrice and Nedim for your answers. I followed the steps above and it works perfectly. 😀