[ Delph Inc. ]
Board works fine and I can walk through only the 4 tiles I have specified but not Diagonal.
I will try the keydown thing again...it didn't work before and I might try something like:
if (keydown(playerdir)) {
playerx+=vecx(playerx);
playery+=vecy(playery);
}
That would work wouldn't it?
Could you give me some more on this tile(x,y) thing?
Or is it just like the 'in' command?
Quote:
Originally posted by CyanideSR71
What exactly is vecx and vecy? Perhaps I use a different term...
|
vecx and vecy are commands that have split the old dirgo array into a horizontal array (x) and a vertical (y) array.
e.g.
vecx contains this array {0,-1,0,1}
and vecy contains {-1,0,1,0}
So if you're using vecx and your NPC/player is facing left, you would get the result -1.