Forum Discussion

staperek's avatar
staperek
Community Member
2 days ago

Variable/Trigger Help

Hello! First time posting so if I share the file incorrectly let me know.

On the attached Storyline file the following is supposed to happen.

Leaner drags and drops answer choice onto one of the 6 spots under "Out of Control"

When they drop it in any of those spots, the variable "DBalanceBeam" gets 1 added to it.

I then have triggers set up to change the state of the balance beam figure to lean right/left and to change whenever the above variable changes.

Right now it will change to the "Lean Right" state, but won't toggle back and forth as I want it to.

Any help would be appreciated, thank you!

1 Reply

  • Here are the triggers you have to "lean" the balance beam to the left and right:

    Triggers run in order. If D Balance is Normal or Lean Right, the first trigger changes it to Lean Left. However, because it's now Lean Left, the next trigger immediately changes it back to Lean Right. That happens so quickly you don't even see it changing to Lean Left. 

    The fix is to use one trigger with an Else statement.

    You can see that work in the attached file. 

    Note: I'm guessing that you plan to use the DBalanceBeam variable to track whether all the objects have been dragged before showing the Submit button. Unfortunately, that's not reliable. The triggers that add 1 to the variable run whenever an object is dropped on a target. That happens if the user moves an object from one target to another. So, for example, the variable could = 6 just by moving one object to each of the drop targets. You either have to add conditions to the "add 1" triggers or use some other way to show the Submit button. Or just keep the Submit button showing. If they click before finishing, well, it's marked as incorrect.