Variable Conditions724 0 2
Hi Community, I need some help creating a variable condition,
2 x drop targets (Asset or Not an Asset) that when a draggable is drop on, fires a boolean variable.
Comments( 0 )
Answers ( 2 )
Unless I'm misunderstanding something, I don't think you need to evaluate the Boolean variables at all?
An alternate way would be to add an additional variable action to these Drops.
The second action would set a numeric variable to increase +1 in the correct cases.
So the Drop trigger would fire two actions, one action to set the respective boolean value PLUS a second action to set the Score variable to increase +1 (instead of == chose += in the Operator drop down) if it's a "good" drop.
This approach means you don't have to evaluate the Boolean variables at all.
I did a simple test (just one text element dropping on a target) and was able to set both variables this way.
Comments( 1 )
Based on the description:
- Prior to exercise set a numeric variable for total score to 0.
- On the page where the boolean variables are being triggered add 2 actions
- an action on variable change (the variable changing being the boolean) that boolean is true then change the total score to be += and value of 1 (this adds 1 to whatever the value was)
- an action on variable change (the variable changing being the boolean) that boolean is false then change the total score to be -= and value of 1 (this takes away 1 from whatever the value was)