posted a while back.
NPC Code:
dir vecx vecy
0 0 -1
1 -1 0
2 0 1
3 1 0
Quote:
commands.rtf
vecx( dir ) vertical movement vector (0,-1,0,1)
vecy( dir ) horizontal movement vector (-1,0,1,0)
|
I'm no expert at this, but I would think that if the player was facing down:
vecx(playerdir) //<-- that would equal the tile the player was standing on. (numeral direction for down: 2)
Numeral Directions:
0 Up
1 Left
2 Down
3 Right
Hope it helps.