Number variable issue in drag and drop interaction.
I am trying to set up a drag and drop interaction where the learner is given one target, and several objects that could possibly be dropped onto the target.
The objective is to determine a pattern (growth or decay, either linear, quadratic or exponential) and determine either the next step in the pattern, or the initial conditions of the pattern.
The learners are given eight objects that they can interact with, and are allowed to drop any number onto the target. The correct number of objects to place on the target can be anywhere between one and eight.
To track how many objects have been placed, a number variable has been made. This starts at zero. When an object is placed on the target, one is added to the number variable. If an object is taken away from the target (the learner changes their mind and takes one out) one is subtracted from the number variable.
The 'correct' or 'incorrect' feedback layers are made visible by clicking the 'submit' button, which shows the layer conditional on the number variable.
So if the answer is x, then the 'correct' feedback layer will be shown if the number variable == x.
The 'incorrect' feedback layer will be shown id the number variable =/= x.
Here is where I run into a problem.
While objects that are not interacted with at all will not influence the number variable, if an object is 'bounced' onto the target multiple times (as could happen when someone uses a touch screen and doesn't drag far enough) the number variable keeps going up. The same thing happens if the object is 'bounced' outside of the target- the number goes down.
This could result in the learner receiving the 'incorrect' feedback slide even though the correct number of objects appear to be in the target zone, because the numeric variable has gone out of sync with the number of objects placed onto the target.
How do I resolve this without changing the parameters of the activity?
I have attached a file with two slides- one where there are two hotspots- a 'drop target' and a 'not drop' that affect the variable, and one where there is a single 'drop target' hotspot, and the numeric variable goes up and down depending on the state of the object (drop correct, or drop incorrect), which is a nicer way of doing things from my point of view.
Both currently display the issue of the numeric variable getting out of sync with the number of objects currently placed on the drop target, if the learner keeps picking up the object and putting it down on the same spot.