Jump direction problem , going elsewhere =/
Hello all please solve my problem.
Im trying to make pple jump bigger & longer jumps by pressing the normal jump key (spacebar). I need to to be Higher and longer , not just higher , not just longer alone , to the direction where the player is aiming (crosshair). Serached and found people only making higherjumps or giving longjump module , I dont want longjump module =/ Using this code I jump higher and longer but not in the direction of where my crosshair is , pls point out to me my errors. PHP Code:
|
Re: Jump direction problem , going elsewhere =/
PHP Code:
|
Re: Jump direction problem , going elsewhere =/
also, use fm_cmdstart instead of fm_prethink. using cmdstart will save a lot performance.
|
Re: Jump direction problem , going elsewhere =/
Quote:
PHP Code:
|
Re: Jump direction problem , going elsewhere =/
Like this.
PHP Code:
|
Re: Jump direction problem , going elsewhere =/
Quote:
|
Re: Jump direction problem , going elsewhere =/
first of all look at dores code to know how FM_CmdStart works (get_uc and not pev). you just changed your forwards name although you were still using FM_PlayerPreThink.
UC_Buttons & IN_JUMP or pev_button & IN_JUMP will be true for more than a single frame which means you will accelerate the player faster than you want him to be. for this you can easily use !( pev_oldbuttons & IN_JUMP ). example: 1st frame - you jump - pev_button & IN_JUMP && !( pev_oldbuttons & IN_JUMP ) - you are in air 2nd frame - your in air and still pressing +jump - pev_button & IN_JUMP && pev_oldbuttons & IN_JUMP 3rd frame - you release jump - !( pev_button & IN_JUMP ) && pev_oldbuttons & IN_JUMP 4th frame - still in air - !( pev_button & IN_JUMP ) && !( pev_oldbuttons & IN_JUMP ) ... ~70th frame - you land - !( pev_button & IN_JUMP ) && !( pev_oldbuttons & IN_JUMP ) |
| All times are GMT -4. The time now is 02:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.