how to make a object to follow others in C

Non-platform specific questions.

how to make a object to follow others in C

Postby raminkhan » Wed Feb 22, 2012 4:55 am

1 object leads the rest how? in x direction may jump sometimes but again it leads the rest and others should jump with that leader. too please get email me at raminrahim@hotmail.com if you can't understand me.
raminkhan
 
Posts: 63
Joined: Mon Sep 12, 2011 3:35 pm
Score: 0 Give a positive score

Re: how to make a object to follow others in C

Postby tintran » Wed Feb 22, 2012 11:25 pm

like this?
followleader.zip
(10.46 KiB) Downloaded 75 times

left,right keys to move, space to jump.
User avatar
tintran
 
Posts: 157
Joined: Fri Dec 24, 2010 1:34 am
Score: 30 Give a positive score

Re: how to make a object to follow others in C

Postby tintran » Sat Feb 25, 2012 10:39 pm

this follower will start following leader when the distance between leader and follower is less than or equal to 50.
Attachments
followleader.zip
(31.28 KiB) Downloaded 66 times
User avatar
tintran
 
Posts: 157
Joined: Fri Dec 24, 2010 1:34 am
Score: 30 Give a positive score

Re: how to make a object to follow others in C

Postby tintran » Sun Feb 26, 2012 9:43 pm

when leader is close to follower, the text "follow" will appear.
if you click on the text "follow", the follower(pacman) will start following the leader.
Attachments
followleader.zip
(29.02 KiB) Downloaded 62 times
User avatar
tintran
 
Posts: 157
Joined: Fri Dec 24, 2010 1:34 am
Score: 30 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest