Explore the community Forums Lectora Lectora Questions & Answers drag and drop question Reply To: drag and drop question

#382889 Score: 0
Profile photo of Jason Dalrymple
Jason Dalrymple
Member
beginner
intermediate
profile
wise owl
curious george
contributor
friend finder
advanced
picture perfect
54 pts
@JasonADal

Building off what Math said and some great timing, I put together a sample that I think matches what you’re looking for. Each time a drop item is released in a drop zone, a series of action groups are triggered:

  1. Set a custom variable based on whether a drop is correct.
  2. Display a message for each correctly dropped item
  3. Set the contents of a status indicator for each correct option

The setting of the custom variables is based on the variable values for the question (i.e. Set BMW correct IF question_0001 contains Car1-BMW or Car2-BMW, etc).

One minor issue I noted is that the action to start everything in motion has to be on each choice text AND has to have a short delay because it looks like the action group is run before the variable for the question is updated.