Adding to velocity
What Im trying to do, is give a player a 'boost' in the direction they are moving. So if theyre moving backwards, this will boost them backwards, if they are moving diagonally backwards, but looking forwards, they will get a boost in that direction, same for any direction. So no matter which way they are moving, regardless of direction, they will get a boos. tBut I believe I have made a mistake when actually 'giving' them the boost.
Example, if a player is running forwards, and uses this boost, they will get a boost forwards, but if they use it again almost straight after, they get an unnecessary boost towards their left or right, causing them to go more sideways, than forwards. I just want to know, how I can give them a boost in the direction they are moving only. Code:
|
For the buttons that the user is pressing
Code:
For the Velocity Code:
Taken from utdoublestep by twistedeuphoria |
Ive got it working, I just need to limit the command so it cant be used more than once every 2 seconds. Can anyone help?
|
get_gametime()
|
Sorry. Here is an example
Code:
|
Thanks a lot. +karma for you. :)
|
| All times are GMT -4. The time now is 15:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.