![]() |
vecx,vecy?
what does
vecx,vecy do?? ive read the definition but i still dont get it, would some redefine it for me? |
its just variables for player movement
|
Quote:
you input vecx(playerdir) and it returns stuff as in this table^! |
eh
i dont get it.... can someone give me an example?
|
use this
NPC Code: |
It was added to make random player movement easier...
you know there are 4 dirs a player can have 0 up 1 left 2 down 3 right so now u watch the table: NPC Code: so if you have the player looking up and u want him to move in this direction you need to substract a value from the players y-Position but the players X-Position has to be the same value so you don't have to add or substract something from the value ok lets say players x pos is 32 and the players y pos is 25 and he is looking up playerx+=vecx(playerdir); //nothing will happen to the players x-value playery+=vecy(playerdir); // oh wonder there is 1 substracted from players y-value and he has gone upwards :) so one simple in-use-example (some Staff-Boots) NPC Code: the for loop is just used to get an easier use for a keydow routine wit less code i is always the value of the dir your char is looking at so while pressing a key your charackter gets faster and he can walk over walls... |
Quote:
|
thxs
thanks
screen_name and TDO2000 |
Re: thxs
Quote:
|
| All times are GMT +2. The time now is 04:15 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.