Quick Jump
I Want To Make A Function That Make The Player Jump Higher But Not Slowly Like Gravity....
Can Somebody Helpme? |
Re: Quick Jump
Hook when a player jumps. You could do it like so:
Code:
Make sure you hook FM_PlayerPreThink to that function (or, if using engine, make that function client_PreThink). It checks if they just pressed the jump button, and if they are on the ground. These are pretty much the conditions for a jump. Then, you will want to grab their current velocity, change it's Z value (dimenson "2") to whatever you want (-1000?), and then set their velocity to that new value. |
Re: Quick Jump
But If I Change The Z Value They Can Stuck In The Ground... :(
If I Can Get The Vector ... And If Its Up Then Put The Gravity in - Else + and Make The Player Immune To Ground Hit |
Re: Quick Jump
Don't change their origin, only their velocity.
Code:
This should make them shoot upwards, still obeying the laws of HL physics (they'll stop if they hit something, and will eventually fall back down). |
Re: Quick Jump
And why negative Z-velocity value? :-/
|
Re: Quick Jump
Because I forgot which way was up.
|
Re: Quick Jump
I see, up is positive for Z-velocity.
|
Re: Quick Jump
OK SO I Need FakeMeta And Engine?
|
Re: Quick Jump
I MADE'it... WE Made'it.. It Jump...
Now i know how to make the bunnyjump :) velocity[0]*=1.2 velocity[1]*=1.2 but now i need to Make The Player Immune To Ground Hit :) Code:
|
Re: Quick Jump
For example:
Code:
|
| All times are GMT -4. The time now is 22:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.