I have 6 hotspots and 6 text boxes and would like to play different audio messages for different mistakes.
if not all hotspots are filled: play audio0 else if hotspot1 does not contain textbox1 play audio1 else if hotspot2 contains a text box with the same text at hotspot 3: play audio2 ... else mark answer correct
It seems like JavaScript would be the right tool, but I don't know how to tell what is in a hotspot. Does the API support that, or is there a better way?
Thank you, but I don't see how to create a trigger that sets a variable if a hotspot contains a certain textbox. I can trigger on when a specific object is dropped on a hotspot, but that would require me to write triggers for most hotspot-object combinations, while I'd just like to do an overall check when the user presses a button to check their answer.
Thanks for offering to help. Here is the relevant part of the slide:
There are six hotspots, named Hotspot 1 - Hotspot 6, and there are 6 text boxes underneath that are supposed to be placed in them. I don't want any action to be triggered until the user presses a button (not shown).
I want to play a certain audio file if Hotspot 1 contains anything except one of the textboxes containing $t0.
I want to play a different audio file if Hotspot 2 and Hotspot 3 contain the same value (both "$s2" or both "$t0").
I want to play a different audio file if neither Hotspot 2 nor Hotspot 3 contains either text box containing "$t0").
Here's one way that I think would work. It's also relatively easy to build. The key is understanding the conditions and making sure they don't conflict with other instructions. I'd write them down as a series of bullets and imagine Storyline looking at bullet 1, seeing if it's met. If so, it'll trigger. And then bullet 2...
That's fantastic, Tom! Thanks for going to so much trouble to solve my problem and explain it so clearly. It hadn't occurred to me to use states, and I had just assumed that drop targets should be hot spots.
Is there a way for me to change the state of a rectangle when an object is removed from it? I plan to keep the drop objects movable, so there's the possibility that a user will drag an object after placing it, and I want to evaluate their answer only if all 6 targets are occupied.
> You could try leveraging the drop correct/incorrect states.
I don't see how I could use the drop correct/incorrect states, because I have objects that are equivalent: I don't care which "$s1" goes into a certain box.
> To track a target, you could have a t/f variable assigned to the target and toggle it based on objects being in it or not.
How can I toggle a variable if an object is removed from a target? I see a trigger for "Object dropped on" but not one for "Object removed from".
If it's too much work to do what I originally envisioned, I can create a different type of question. No need for us to disappear down this rabbit hole.
It's sufficiently complicated that I'll find a different way to write the question, but I appreciate your help and am sure I'll apply my new knowledge of object states.
12 Replies
I think you can use variables to track what you want and then set conditions to play audio when you hit certain values.
For example, you could have a t/f variable for each selection. Then set a trigger to play audio on the condition that var=T and var2=F, etc
Thank you, but I don't see how to create a trigger that sets a variable if a hotspot contains a certain textbox. I can trigger on when a specific object is dropped on a hotspot, but that would require me to write triggers for most hotspot-object combinations, while I'd just like to do an overall check when the user presses a button to check their answer.
You can create variables based on any of those criteria and then do triggers based on the values of variables (or multiple variables)
Every click can adjust the variable. And each trigger can have conditions.
Do you have an example screen of what it would look like?
FYI David's doing a series of webinars on working with variables. You can also find previous webinars on the training site.
https://training.articulate.com/upcoming?category=storyline&search=var
Thanks for offering to help. Here is the relevant part of the slide:
There are six hotspots, named Hotspot 1 - Hotspot 6, and there are 6 text boxes underneath that are supposed to be placed in them. I don't want any action to be triggered until the user presses a button (not shown).
I've attached the story file.
Thanks.
Here's one way that I think would work. It's also relatively easy to build. The key is understanding the conditions and making sure they don't conflict with other instructions. I'd write them down as a series of bullets and imagine Storyline looking at bullet 1, seeing if it's met. If so, it'll trigger. And then bullet 2...
https://360.articulate.com/review/content/9b8e5dad-da09-48d8-9262-4b24060c7216/review
That's fantastic, Tom! Thanks for going to so much trouble to solve my problem and explain it so clearly. It hadn't occurred to me to use states, and I had just assumed that drop targets should be hot spots.
Is there a way for me to change the state of a rectangle when an object is removed from it? I plan to keep the drop objects movable, so there's the possibility that a user will drag an object after placing it, and I want to evaluate their answer only if all 6 targets are occupied.
You could try leveraging the drop correct/incorrect states.
To track a target, you could have a t/f variable assigned to the target and toggle it based on objects being in it or not.
> You could try leveraging the drop correct/incorrect states.
I don't see how I could use the drop correct/incorrect states, because I have objects that are equivalent: I don't care which "$s1" goes into a certain box.
> To track a target, you could have a t/f variable assigned to the target and toggle it based on objects being in it or not.
How can I toggle a variable if an object is removed from a target? I see a trigger for "Object dropped on" but not one for "Object removed from".
Thanks again for your help.
Ellen
If it's too much work to do what I originally envisioned, I can create a different type of question. No need for us to disappear down this rabbit hole.
you could create a catchall hotspot that sits under the targets
when an object is dragged over it (which would be everything but a target) you could change a variable
perhaps each draggable object has a t/f variable to track if it's in a target
and each target has a t/f variable
Thank you. I bet that would work.
It's sufficiently complicated that I'll find a different way to write the question, but I appreciate your help and am sure I'll apply my new knowledge of object states.
This discussion is closed. You can start a new discussion or contact Articulate Support.