Same variable triggers, different results

Apr 07, 2016

I've created a vocabulary exercise based on this previous discussion. I've made nearly 2 dozen of these activities with between 2 and 12 words per lesson. All but 2 have worked fine but two are driving me nuts. 

The issue is, in this one, that the "facial cues" question slide skips by, even when the variable has (supposedly) been set to true.

Can anyone see what the glitch is here? I reuse the slides from lesson to lesson and just change the variables and triggers so I just can't see where the difference is.

Grateful for any help!

6 Replies
Jennifer Clarke

Hi Wendy - You're right - the triggers were absent but that isn't where the problem is - I had deleted the variable and triggers to try again and neglected to reassign them on the review slide. The issue happens before that. If you click on a word in the first slide, you get tested on the related definition slides. If they're not clicked, the related question slide just gets skipped over and the definition is available on the review slide. So if you click on 'facial cues', you should be presented with the 'facial cues question' slide to test your knowledge. The triggers are the same for the other words (and I have dozens of slides with up to 12 words that have no issues) so I just can't figure out why somehow the facial cues variable is not getting set to true when clicking its check box. I've attached a new file of the slides. Thanks for any suggestions!

Wendy Farmer

So I've found that your facial cues variable isn't turning to true when selected with the triggers you had.  Also, you don't need to have a trigger to change the textbox to selected as that is an inbuilt state with SL, it knows the state is selected.

 

 

I have removed a few triggers and updated some as well and it is now behaving as I think you want it to.

 

See attached

Walt Hamilton

Jennifer,

It's all a question of luck, and if more than half of these triggers are doing what you expect them to do, you are lucky.

Here's why. If you create a shape with a selected state, it has a built-in trigger that changes its state to selected when you click on it. If you write your own trigger to do that, they are likely to interfere with each other, with strange, unpredictable and (not often) wonderful results. Deleting those triggers may not fix your problems, but cannot hurt.

Your other triggers are setting the variables "When the state of ... is true", and that only works if you are lucky. The program has to be checking that trigger at the exact instant the object changes states for it to work. So it is a question of whether the state gets changed by the second trigger while the first trigger is still checking it. It could be that "a", "b", and "d" are high enough on the alphabetic list of variables that they get changed in time, but by the time it sorts through the list and finds the variable that starts with "f", it is too late to catch the state changing. (This is the best evidence I've run across that SL's internal storage of variables is alphabetic.)

Change those triggers to set the variable when the user clicks, and it will always work.

 

Edit: Which is what Wendy did while I was writing this. :)

Jennifer Clarke

Thanks Wendy and Walt. I have a nice rosy glow on my forehead now from the "duh" slap I gave myself ;-)

I think my first mistake was using a checkbox in the first place - clicking the word itself would simplify everything. That's why there's a second trigger needed for every word - just to change its colour...

The triggers you did Wendy are so much simpler. And thanks for the heads up about how the  order triggers and variables work Walt.

You're both super heroes!

This discussion is closed. You can start a new discussion or contact Articulate Support.