The Daily Click ::. Forums ::. Klik Coding Help ::. one character following another
 

Post Reply  Post Oekaki 
 

Posted By Message

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
30th October, 2003 at 18:23:38 -

Here's a simple way that should work a lot like zelda:

Draw a little circle, and set it's hotspot to (say) 20px above when looking up, 20px below when looking down, ect. Stick the action point in the middle of the circle.
Make this always at the position of characterA, and get its direction from characterA's animation.
Then, just have character B a ball, which always faces A and moves towards the circle's action point when not overlapping the circle object.

This way, it'll always stay behind, never to one side, and it'll lag behind a bit when your character runs (I'm still thinking zelda). If you have B's speed high enough, it'll always be in the right spot or move there quickly if it's not.

If you don't want B to walk under A, have the circle rotate around with a little delay, rather than just following A's direction. Assuming B is overlapping the circle when it starts rotating it should look fine. If B moves faster than the circle rotates, then it'll just walk around you rather than through you, and it won't look goofy if it's facing the wrong direction.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click