View Single Post
  #4  
Old 08-31-2007, 04:49 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 DustyPorViva View Post
It depends on where you want the 'center' of the player. The x is always player.x+1.5, but the y, I usually prefer it in the center of the body, not the whole player.
The 'size' of the player is 3x3, this is shown in Graalshop by the 48x48 pixel box. Now, if you mean the center of that, then it's player.x+1.5 and playery+1.5, but I prefer player.x+1.5 and playery+2(or 2.5), which is near the center of the player's body.
So if you wanted the exact center of a player.

Center X - player.x + 1.5
Center Y - player.y + 2

Because I want the center of the body.
__________________
Stan.
Reply With Quote