Trigger conditions ignored?

May 23, 2023

Hi,

I am at my wit's end with this activity. There are two components to the answer - the number and the symbol. The correct answers are $0.09 and 9¢. I have set up three different feedback layers (Correct, Incorrect symbol, and Incorrect) and a Q1Answer variable with triggers to set it to Correct, Incorrect symbol, and Incorrect depending on the input (see attached). 

The problem is that the correct feedback layer keeps triggering at the same time as the incorrect and incorrect symbol ones. I made the variable visible on the screen so I could tell what was going on, and the correct feedback layer is appearing even when the variable clearly says 'incorrect' or 'incorrect symbol'.

For example, if I enter $9, I get the incorrect symbol feedback, which I should, but ALSO the correct feedback. It seems to be ignoring the 'and' conditions in the trigger. 

Am I missing something obvious here? Thanks in advance!

2 Replies
Kelly Auner

Hi, Jennifer!

Thanks for reaching out and I'm so sorry to hear that you're experiencing this issue. I understand how frustrating it can be when your course isn't working as expected! With your permission, I'd like to take a closer look at how your course is set up. You can attach it here or share it privately in a support case. We'll delete it from our systems once troubleshooting is complete!

Walt Hamilton

Like Kelly says, it's practically impossible to know what's going wrong without seeing the actual project. Attach the .story file (or at least the offending slide) here, so someone can take a look at it.

While you're doing that, there are a couple of things to check. The last trigger in the attached graphic is not helping. If its conditions are true, it doesn't change the value opf Q1Answer in time to be considered. Triggers are executed in the order they appear in the list, from top to bottom. So the layer is shown before this trigger decides whether to set the variable or not.

Secondly, layers show one at a time. They default to hiding other layers when shown, so if you are seeing two of them, that setting has been changed. The way the three "Show layer" triggers are written, only one (or none) is shown, depending on the content of the variable. It is, unless there are other triggers lower that we can't see. So if you are seeing two layers at the same time, the most likely way for that to happen is if you are running through the list, changing the variable, and running through the list again  without hiding the first layer. This is something that can easily happen with testing, and choosing different answers.

At any rate, if the variable content is correct, the problem is not with the AND conditions, the problem is with the Show Layer triggers. Actually, I think it sounds like the problem is that the previous layer is not being hidden.

Of course, there is a possibility that you are clicking Check Button 1 one time and two layers are showing. That can happen if there are more triggers lower that mimic the triggers that are showing, but with different logic.  It might also happen if there is some corruption in the slide, in which case you would have to rebuilt the entire slide from scratch, at a minimum.

But again, without seeing it, who knows?