>Thing is, it's not great and I was wondering if anybody had any 
>ideas for making it better (or how you would do it). The character 
>is a little ball, much akin to the character in Putty on the Amiga. 
>His eyes face the direction that he's being dragged.



Play with atan(x,y). In the message window, say:

put atan(10,10) --or any other two integers

You should see that the number you get is the number of radians of 
the angle between someplace, and someplace plus x,y pixels away. 
Those two places could be the loc of your sprite, and the mouseloc. 
For example, try this:

on exitframe
   put atan(the mouseh-320,the mousev-240)
   go the frame
end


Move the mouse around the screen, and you'll see the number changing. 
You could change the radians number to a scale of 1 to 8 (to then 
decide which of your cast members to draw), by playing with the 
number you get:

on exitframe
   theangle = atan(the mouseh-320,the mousev-240)
   put 8-(integer((theangle+pi)/pi * 4) mod 8)
   go the frame
end


I'm not going to explain the numbers I've used, but just try it, it 
may do everything you need.


[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