Thread: vecx and vecy
View Single Post
  #9  
Old 08-16-2002, 10:30 AM
Spectre1337 Spectre1337 is offline
Banned
Spectre1337's Avatar
Join Date: Nov 2001
Location: United States
Posts: 790
Spectre1337 is on a distinguished road
Send a message via AIM to Spectre1337 Send a message via Yahoo to Spectre1337
Quote:
Originally posted by screen_name


lol, thats old school


the vecx and vecy are used in mostly movement scripts


NPC Code:

vecx vecy dir
0 -1 0
-1 0 1
0 1 2
1 0 3



when you move, then it basically does this
playerx+=vecx(playerdir);
playery+=vecy(playerdir);

so if you move up (dir 0), you will get 0 added to your x value, and -1 added to your y value
We learned something stupid like that in school.. There is the axis thing, its like the big DOT in the middle. the left side is the X and the right is the Y, I think. And you would write the answers to the problems like (0,3) and stuff.. Its freaky.

0 = axis
3 = y

If it were -3, I think it would be X.. im not sure *cries* I hate math
Reply With Quote