Variable not changing as expected
Apr 02, 2021
By
William Ryan
Hi All, I am working on a slide with a quiz-type interaction, and is set up like this:
User has to correctly click on a part of a screen capture image. They get 1 point for that. Then they have to enter a value in a numeric entry field. They should get 1 point for that if they enter the correct value of 0.25, or else they get zero.
- I set it up with a variable "Z_Axis_Pos_Score" that changes from the default of 0 to 1, when the user clicks on the correct part of the screen capture image. That works.
- I have another variable "Z_Axis_Value" that sets the value of that variable to the typed value. That works too.
- There is a trigger that should set a third variable "Z_Axis_Value_Score" to 1 when the Z_Axis_Value = 0.25. This is not working. It sets to the typed value of Z_Axis_Value instead.
...any ideas?
6 Replies
Is 03_Z_Axis_Value a text-entry field or a numeric entry field?
Hi, thanks for your reply. Yes they are all set to numeric entry fields.
There is at least a small chance that this trigger checks the 03_Z_Axis_Value before it is changed. Set the "When" part to "When variable 03_Z_Axis_Value changes". If that doesn't fix it, there are a lot of reasons why it isn't working. Attach the .story file here so someone can take a look at it.
Hey! That did the trick! Thanks a lot for your help.
You're welcome. PIAWYC (Pass it along when you can).