calculate distance between two actors...

Talk about making games.

calculate distance between two actors...

Postby rconnor » Mon Jan 29, 2007 9:15 pm

Hello folks!

I'm having trouble figuring this out. I'd like to show the distance between two actors in a third text actor. As the actor A moves toward or away from actor B the text actor would show the running value.

Your help is much appreciated.

Thanks!
R





THANKS AGAIN!
Last edited by rconnor on Tue Jan 30, 2007 5:37 pm, edited 1 time in total.
rconnor
 
Posts: 11
Joined: Sun Jan 07, 2007 5:14 pm
Score: 0 Give a positive score

Postby makslane » Mon Jan 29, 2007 11:14 pm

Try this:

Code: Select all
textNumber = distance(A.x, A.y, B.x, B.y);
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron