"Rees, Jonathan" wrote:
>...
> Does anybody know how I can record the point in a list so when the on
> detcetcollision handler is called I can set him to the say a point of 3
> locations before.????
> 
> or is there a way of recording the position one or three places or pixels
> or points or whatever before the current position of the sprite, so for
> instance I can place the value of the loc or point into lets say property
> "last_loc" but how do actually make this always be the one  or third point
> (whichever) point before the one its currently at. I would like to use this
> so that when the sprite interacts I can instruct it to go here....

You've described it almost exactly. Now translate it into code.

Have a list for each moving sprite. 
Whenever you move the sprite, add its new location to the end of its
list and take the first value off the list. 
Whenever the sprite collides with something, set its location to the
first one in the list (and re-build the list with the three items all
being that new location). 

When you first create the list, make it with the three items all being
the start location of the sprite.

 
It's a short trail of breadcrumbs. When you find that the trail was bad
(caused a collision) you wipe it out and start a new one.

-- 
Carl West    [EMAIL PROTECTED]
617.262.8830 x246    

I have no superfluous leisure; my stay must be
stolen out of other affairs; but I will attend you awhile.

           - Isabella, Measure for Measure, Act 3 Scene 1

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to