Raised This Month: $51 Target: $400
 12% 

block player on ground movement?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 08-22-2012 , 08:00   block player on ground movement?
Reply With Quote #1

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)
jimaway is offline
SpaceRip
Junior Member
Join Date: Aug 2012
Old 08-22-2012 , 08:22   Re: block player on ground movement?
Reply With Quote #2

set move type fly
or
play with gravity, just set_pev( id, pev_gravity, 0.000001 ) and then set z velocity to 0
SpaceRip is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 08-22-2012 , 08:29   Re: block player on ground movement?
Reply With Quote #3

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?
jimaway is offline
SpaceRip
Junior Member
Join Date: Aug 2012
Old 08-22-2012 , 08:59   Re: block player on ground movement?
Reply With Quote #4

Quote:
Originally Posted by jimaway View Post
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.
SpaceRip is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 08-22-2012 , 11:41   Re: block player on ground movement?
Reply With Quote #5

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 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-07-2012 , 10:25   Re: block player on ground movement?
Reply With Quote #6

bump
jimaway is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:17.


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