BillyBob
I'm pretty sure that what you want to do can be done without the need for scripting.
You've given us no indication of your assessment of your skill level, so in that absence I'm going to assume you know nothing.
You could have a lot of reading and learning to do including the Help Files. Remember to click the Help Button at the bottom of each property dialogue screen for more detailed explanations.
First things first:
First, my suggestion is that you do not try to make the final presentation on your first attempt. For example, when I'm trying a new technique, I set up a special chapter that I call the
Test Bed. I make the page size the same as my pub so that everything fits and can be transferred once I have it right. That technique has saved me hours by not ruining my hard-won development.
Quote:
I'd like the user to be able to drop the item in the wrong place, for example a banana in the vegetable basket
1. Dragging and then dropping an object onto a target is controlled by the
Drag and Drop Properties for any object. Double-click on an object, and open the Drag and Drop Tab. Study the options and read the Help Files.
At your option, an object can be both dragged, and have something dropped on it. 2. Setting up the drop or target zone is controlled by the
Drag and Drop Properties for any object. Double-click on an object, and open the Drag and Drop Tab. Study the options and read the Help Files. These properties allow you to drop
all objects, or to restrict the accepting of a dropped object.
Quote:
then be allowed to fix the error himself after getting the feedback "some items are misplaced. Try again.
1. Again, the
Drag and Drop Properties for any object controls whether an incorrectly dropped object is accepted or rejected; and whether it automatically returns to its starting point.
2.
Triggers are important in initiating actions. It's your job to put various triggers with actions appropriate to what you want to do. For an object involved with D&D, open the Action tab for the object.
Select the
Trigger tab, and then the
Drag and Drop group of triggers. and check out the 5 available triggers. You have to select a trigger appropriate to your needs.
Before you pass over the Triggers tab, select the
Advanced group of triggers. In that group, when working with D&D, I find the
Collision Enter and the
Collision Leave triggers useful.
Quote:
then be allowed to fix the error himself after getting the feedback "some items are misplaced. Try again.
This area of your requirements can be achieved by using scripting, but it can also be effective using the
normal actions.
The secret to success depends on your using appropriate variables. Depending on your needs, you might be able to use the built-in system variables that work with scoring information. More likely, you will need to establish your own variables.
I do not plan on running a tutorial on variables, but here is my appreciation of a methodology.
1. Define a trigger/action combination that involves the scoring activity in which you are interested.
2. Define a variable that records the result of that activity -- e.g. 0. When the result changes, have the variable change its value to 0.
3. With the value of a variable changed, you can now test for the value -- e.g. variable = 0, variable > 0, etc. -- and initiate an action depending on the value of a variable.
You keep changing and resetting variables until you have set up a logical sequence that lets you produce the result you want.
-------------
This is a pretty low-key introduction to using variables to to control conditional actions.
Because of the almost infinite variety of possible outcomes, I believe it would be difficult if not impossible for someone like me to provide you with a blueprint for your put. Hopefully I can point you in a direction that might help. I can't speak for other posters, but I do not provide completely developed pubs, but I will try and point people in a direction that might help.
If you need to ask for more help, you should consider providing us with very detailed information of what it is that you want to do.
BTW -- IMHO, you might have received [edited] more help if you had posted in the Basic Forum, rather than here. Some people are shy about visiting the Advanced Forum
HTH
PS: In my Opus Guide, I have a chapter dealing with Drag and Drop. If you are interested, you can download it for free. It will remain on my site for a few more days:
http://www.jeelan.com.au/transfers/OpusGuide.zip
NOTE: I've tested this link on this post and it works.