Forum Discussion
Badge not appearing
- 2 months ago
amandarauscher5ā: These are the triggers on the last slide in Scenario 1:
Triggers run in order. So when the user clicks the button, the program jumps to the Dashboard slide. However, a trigger can't run if the program has already left the slide where the trigger is. That means the Scenario1Visited variable stays False. Thus, when the user returns to the Dashboard, the trigger condition that the variable = True isn't met. That's why the badge didn't show.
FYI: Whenever you're using variables, especially across multiple slides, it's a good idea to insert temporary variable references. This lets you see whether each variable is changing as expected. When I did this in the attached file, I could see right away that the Scenario1Visited variable was still False after I finished the scenario. So I knew to look at the trigger that changes it to True.
BTW, here's another trigger in your file:
The Resilience badge will never be changed to Normal using that trigger. When trigger conditions are connected with "and," the trigger will only run if all of the conditions are met. There's simply no way a variable can be multiple values at the same time. Conditions should be connected with "or" to indicate that the trigger should run if any of those conditions is met.
And, in this case, it would be easier to use the condition "ScenarioOnePts ā 10" (instead of listing all of the potential scores that don't earn the regular badge).
There's another issue with that trigger: it's set to run when the timeline starts on the badge. It needs to run when the timeline starts on the slide.
One more thing: You'll see in the attached file that I gave meaningful names to the badge pictures. I highly recommend giving meaningful names to all objects, variables, motion paths, and layers involved in interactions. That makes programming and troubleshooting much easier. That's why I mentioned in my previous reply that one should do this before uploading a .story file.
Thanks! I uploaded the applicable file here.
Also here is a little more context. For each scenario the learner can either earn the a specific badge to the theme of that scenario (scenario 1 is "Conflict Diffuser" scenario 2 is "Team Player" and scenario 3 is "Active Listener") or the badge titled "Resilience Pro" if they didn't guess all the correct responses throughout the scenario.
In addition to the number variable "TotalPoints" which is tallied on the Dashboard 1.1 slide, each scenario's points are tallied individually with the number variable "ScenarioOnePts" and then so on and so forth for the other two scenarios. I was trying to use the individual scenario variable to help determine which badge would appear on the dashboard's scenario based off their earned badge. Both badges are on the dashboard with the initial state of "Hidden" and based on the value of that scenario's variable, one or the other badge should appear. I tried to add another T/F variable to indicate if the slide was visited, but that may extraneous.
I'm very new to variable so I'm sure I may have made some things more complicated than they need to be.
Related Content
- 2 years ago
- 4 months ago
- 4 months ago