View Single Post
  #24  
Old 09-01-2007, 02:07 AM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
Quote:
Originally Posted by Polo View Post
For movement systems, I have always used...
NPC Code:
temp.cx = player.x + 1.5;
temp.cy = player.y + 2;


Which give the center of the players base (thats the area which blocks against walls). Add/subtract 1 from those positions to find the respective edges of this region.
I'm just getting the center of the player to calculate hit detection using the center of the attacker and each possible person to hit.
__________________
Stan.
Reply With Quote