
10-06-2009, 03:40 PM
First you should make a calibrator. To do that, create two variables, one called TopDist and one called LeftDist. Then, create a method that loops constantly, it can be a "While true," a "loop infinity times," or a "while the world is running" in the "during" part. Inside this method, have the variables both set their values to one. Then, go to the world's function tab and drag the "cursor distance from left edge" in place of the number one for the leftDist variable, and do the same for the topDist variable, but with the "distance from top edge" function.
Now, if you play your world with the two varialbes in sight behind the Playing Window, you should be able to see what distance Alice recognizes the mouse is away from each edge.
To make an object appear, just put in a "while leftDist > x" or "while leftDist < x" method, then have it trigger the method you want, like the object appearing.
|