X X X
X N X
X X X
im assuming to turn the npc northwest you would do
npcs[i].absX - 1, npcs[i].absY + 1
then southeast would be like
npcs[i].absX + 1, npcs[i].absY - 1
etc
|
Hey I had just added directional facing for my NPCs and I came across a problem, diagonal directions such as north-east and south-west,
what im using right now is like:
How can I edit this code in red for diagonal directions? Thanks.Code:if(npcs[i].walkingType == 1) { //North npcs[i].turnNpc(npcs[i].absX, npcs[i].absY-1); }
X X X
X N X
X X X
im assuming to turn the npc northwest you would do
npcs[i].absX - 1, npcs[i].absY + 1
then southeast would be like
npcs[i].absX + 1, npcs[i].absY - 1
etc
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |