7 Replies
Luke Heathershaw

Hi Katie,

You can use triggers to add '10' to a variable when an object is dropped successfully on a target.

You would then reference the variable to show the value.

I've put together a quick example, see attached. The example might not be exactly what you're after, but the method should still be the same.

Hope it helps,


Luke Heathershaw

No problem. 

What I would do is create a new target that is the same width and height of your project, and have it sit behind the other targets. It could even be completely transparent if you wanted.

Basically, this way, when the learner drags the objects off the "+10" targets, it has to hit this new target and so it subtracts 10 (but only if the value of the "total" variable = 10 or higher. This is so you don't start seeing minus values).

I'd also set the draggers to 'Free' on the new target (right click on the new target > Drag & drop > Free).

I've attached a new example, hope it helps.


Katie Evans

Ok Luke, one more!

The example works perfectly (I skinnied it down to multiple drag sources and one drop target with the transparent background and the free target area). However, if I accidentally don't completely move the drag source out of the drop target area (if I let my mouse go too soon), the number counter still adds 10; same with the transparent area (if I move around the drag source, it subtracts 10). What would my condition be? 

Luke Heathershaw

Sorry Katie, i've only just seen your latest post.

If I understand the problem correctly, you could add true/false variables for each target. When a dragger is dropped on a correct target, it also changes it's relative variable to True.

So basically create 3 more true/false variables called 'target1', 'target2', & 'target3' and create triggers to adjust them to 'True' when each dragger is dropped correctly. 

You could then adjust your current triggers to 'add 10' to the total if the dragger is dropped on the correct target AND 'target1' equals false. 

Then, set your triggers to adjust the new variables back to 'False' if the draggers are dropped on the background target.

I can't test this at the minute, but in my head that sounds like it should do the trick!

Hopefully that makes sense but let me know if not and I'll see if I can modify the example.