AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   block player on ground movement? (https://forums.alliedmods.net/showthread.php?t=193718)

jimaway 08-22-2012 08:00

block player on ground movement?
 
is it possible to make player move on ground same way as in air? (get speed by air-strafing)
i did something like this just by changing players Z velocity 5 units higher froum ground in prethink, but this way there are some bugs (getting stuck in ceiling in tight places etc), and by trying to fix them the code is getting rather large in prethink what is a bad idea.
so i tried to remove FL_ONGROUND flag in prethink, but that didnt do anything, would something like blocking touch with floor entity work or is orpheu needed for this (if even possible with orpheu)

SpaceRip 08-22-2012 08:22

Re: block player on ground movement?
 
set move type fly
or
play with gravity, just set_pev( id, pev_gravity, 0.000001 ) and then set z velocity to 0

jimaway 08-22-2012 08:29

Re: block player on ground movement?
 
gravity wont work if youre on ground, and if you hit a ramp with gravity, you will float in the air with no way getting back down, and wont move type fly cause no clip type movement?

SpaceRip 08-22-2012 08:59

Re: block player on ground movement?
 
Quote:

Originally Posted by jimaway (Post 1778737)
gravity wont work if youre on ground, and if you hit a ramp with gravity, you will float in the air with no way getting back down, and wont move type fly cause no clip type movement?

make traceline on ground playerorigin - groundorigin = tracedistance and

get player min/max
if (playerorigin + min[2]) - tracedistance[] < 2.0
setgravity normal
else
setgravity 0.0001, setorigin[2] + 0.1

anyway you get my idea.

jimaway 08-22-2012 11:41

Re: block player on ground movement?
 
i started out with something like that, and it will make player have this "bouncing effect" (constantly setting z origin little higher at some point) also it has the same problem: player will get stuck in ceiling in tight places

dont try to give me alternatives, i just want to know if its possible to make player have same movement as in air, on ground

jimaway 09-07-2012 10:25

Re: block player on ground movement?
 
bump


All times are GMT -4. The time now is 05:53.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.