Forum Discussion
Evaluate Variable To Determine Motion Path
Hi Jennifer,
There is nothing wrong in the way you are evaluating your variable. Your problem is caused by the way you have set up your motion paths.
If you set up a motion path that starts 4 centimetres away from your character, the character will jump those 4 centimetres when it starts its motion path, which is why it is disappearing off the screen after it has reached first base. In your case, you have set up the motion paths to run between the various bases, but the motion path will move with the character and so, by the time the character arrives at first base, the motion path has actually moved off the top of the screen.
To get round this problem, what you need to do is to set up your four motion paths to move the character in the four directions from the character's start position. The trick is to then go to the Path Options and select Relative Start Point for each motion path. This will ensure that the character then moves along the appropriate motion path relative to the position it is currently in:
I have made the necessary adjustments in the attached version of your original SL file. If you have any queries, just get back to me here.
The other advantage of using relative start points with motion paths is that, in your case, you could even use another variable for incorrect responses and then penalise your user for, say, two incorrect responses and send them back one base.
Hope this helps.