Highlighted

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

Community Beginner ,
Jun 23, 2020

Copy link to clipboard

Copied

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!

Views

74

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

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

Community Beginner ,
Jun 23, 2020

Copy link to clipboard

Copied

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!

Views

75

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Jun 23, 2020

Copy link to clipboard

Copied

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Jun 23, 2020

Copy link to clipboard

Copied

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Advocate ,
Jun 23, 2020

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Jun 23, 2020

Copy link to clipboard

Copied

I have a good idea how to do that, but one important question was not answered: do you allow the learner to click the image again when it is already in the correct position? 

 

BTW no need for click boxes over a shape, since you can use the images directly as buttons. Something Stagprime seems tto ignore, is new to 11.5..

 

To avoid confusion, because having two different solutions can be very confusing, I will step away. Success!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Advocate ,
Jun 23, 2020

Copy link to clipboard

Copied

My experience has been that if you modify the clickable object itself it can become problematic.

I am fully aware that images can be buttons but in state view their position becomes locked so trying to rotate them becomes a chore. (perhaps there is a trick there I have not discovered yet)

As such - I have found it to be much easier to have my simple shapes rotate independently and use the click box to control what happens

 

There are lots of other questions that could be asked of this scenario - and we can cross them if they come up. In the case of allowing the learner to click again when correct position is reached we just need to add a disable command to the if statement that is checking for the right answer. I know that my answer is not 100% complete and that there may be more questions but the point is to help show a helpful direction to take.

 

I actually believe that seeing multiple solutions to a problem is beneficial. Let the user pick the concepts that make sense to them. It can also help others who read the post in the future who perhaps like one of the other solutions offered. Sometimes I learn little tidbits too. If you simply stick to explaining how you would do it instead of poking jabs at the ideas offered by others at the same time - perhaps it would not be so confusing.

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Jun 23, 2020

Copy link to clipboard

Copied

Already mentioned that click boxes is one of the items which are not acceptable in responsive projects.  That is rhe reason why I avoid them whenever possible. 

A buttons which moves leads to issues, but for other modification like this rotations there are workarounds.

Anywat as long as the question about allowing disabling is not answered,  I will not continue to help.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Jun 23, 2020

Copy link to clipboard

Copied

Yes, the learner can click as many times as he wants. Even if it has already passed through the correct position of the figure.

 

Thank you both very much, I will try the solutions and let you know if I have solved it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Resources
Captivate User Guide
New Group