Thread: Vecx and Vecy
View Single Post
  #2  
Old 09-06-2002, 05:35 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
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.
Reply With Quote