Skip to main content
Participant
June 23, 2020
Question

How to asing a score to a state (rotation) of an object

  • June 23, 2020
  • 7 replies
  • 453 views

Good afternoon,

 

I'm creating a project in which, when a user clicks on some objects, they rotate 90º on themselves.

 

I'd like to know if I can assign a score to the object's spin; f.e., when the object is in 180º, it is assigned a score of 1. The purpose of this is to identify when all objects are in the correct position to enable the "Forward" button.

 

Thank you!

    This topic has been closed for replies.

    7 replies

    Lilybiri
    Legend
    June 23, 2020

    Only questions and Success events of interactibe objects can have a score. 

    I wonder why you need a 'score'? You want a forced view, which is achieved in most situations by using Boolean variables. Preview one variable for each multistate object and make sure it is toggled to 1 when the appropriate stte is made visible. At the same time you test the value of all the variables and show the Next button when they have all been toggled to 1. There is an alternative workflow which I use when designing shared actions. 

    Too much details are missing: how many states do you have? Only 2? I understand that you use the objects (probably images) themselves as buttons which means you are using version 11.5. But do you allow the user to click the button again to reverse the situation or to go to a third state?

    Participant
    June 23, 2020

    Thanks for the quick response. I'm trying to explain myself in more detail.
    I have four images in my scenario and each one has four states (corresponding to each 90º turn and the "Normal" state).
    The interaction consists of rotating the four images until to find their correct position. Therefore, on the one hand I need:


    1) All the images to rotate (change their state) when you click on them.
    2) To establish in each image one of the states as the correct one.
    3) To show a Next button/Congratulations slide when you find the correct position of all the images.

    - I don't need "Undo" button
    - Yes, I use Captivate version 11. 5

    What do you think would be the best way to do that? Thank you very much!

    Stagprime2687219
    Legend
    June 23, 2020

    Personally - this is the way I would tackle this.

     

    Keep the shapes with the states and place a click box over them.

    Make a variable to go with that shape.

    On Success have the shape go to the next state and also have it increment a variable for that shape by 1.

     

    You'll need to make the variable wrap though.

    So for example, if you have four positions that you want to be 0/360 = 1,  90 = 2,  180 = 3, and 270 = 4

    Initial state=1

    We don't want to go over 4 so  make a statement that says 

    if (myVariable == 5) {

    myVariable = 1;

    }

     

    Let me know if that makes sense - happy to help further.