Décompte d'objets

Apr 23, 2021

Bonjour,

Je tente de faire un décompte des éléments devant être trouvés dans une slide à l'aide de HotSpot. Quand l'utilisateur clique sur un hotspot, il est dirigé vers un calque de rétroaction et, lorsqu'il clique sur le marqueur fermé, cela ajoute 1 à la variable décompte. 

Ensuite, sur mon calque de base, j'ai mis une boite de texte avec différents états (0 à 6) et je veux que l'état change quand l'utilisateur revient au calque de base en fonction de la valeur de la variable décompte (si c'est 2, le décompte affiche 2, etc.). J'ai donc ajouté un déclencheur par état sur le calque de base qui dit : change l'état de la boite de texte en 1 quand la chronologie de la diapo commence, si la variable décompte est égale à 1 (pour 0 à 6). Ça ne fonctionne pas. J'ai donc essayé quand la chronologie se termine ou atteint un point précis, ça ne fonctionne pas non plus. J'ai également ajouté un déclencheur sur les calques pour dire d'aller à 0 seconde du calque de base quand l'utilisateur ferme les calques de rétroaction pour que la chronologie recommence chaque fois, ça ne fonctionne toujours pas. Je suis à court d'idée. Quelqu'un peut m'aider avec cela?

Merci beaucoup!

8 Replies
Maria Costa-Stienstra

Bonjour, Anick!

Thank you for reaching out!

If I understood correctly, you are trying to create a variable that counts the number of times the user clicks one or more hotspots, which would change the state of a textbox.

My suggestion would be to use the trigger When the variable changes for the different states:

Windows 10 (1) 2021-04-23 at 12.52.22 PM

I'm attaching a sample .story file here. While I used a shape with states instead of a textbox, it should work the same way.

Let me know if this works!

Mailbox UASsceurMb724

Hi Maria,

your example is very good, however, could you please suggest how to create a trigger that will allow a user to click on the object only once?

Because, now I can click on 1 person four time and the count will be 4/4, but it is not correct, as I need to click once per each person.

Thanks,

Liubov

Maria Costa-Stienstra

Hi, NBS.

Thank you for sharing the .story file!

I believe adding a condition (If the state of Marker 1 is different than visited) to your trigger should do the trick:

Windows 10 (1) 2022-03-17 at 11.07.05 AM

As you can see below, the layer still shows up when the user clicks on an option again, but the counter doesn't increase:

Screen Recording 2022-03-17 at 11.05.56 AM

I'm attaching the edited file with my suggestion.

I hope this helps!

Mailbox UASsceurMb724

Dear Maria,
this is fantastic, you are a genius!
I am very appreciate for your efforts and extra time.

Also, I posed one more comment here https://community.articulate.com/discussions/articulate-storyline/storyline-360-location-of-closed-caption-in-the-player#reply-789775
May you can help me with this also.
I know that we cannot change the captions position on the slide by using the settings, but maybe I can use some JavaScript. 

Thank you so much.

Maria Costa-Stienstra

Hi, NBS.

I'm so happy it worked, and thank you for the super kind words! You made my day!

As for the other post you linked, unfortunately, my knowledge in Javascript is very limited, and it's not something we offer support on. I'm hoping others in the community will be able to help you troubleshoot the code or provide you with another workaround.