Hey, I have a small problem, I'm creating a bhop and surf gamemode with a nice ui but my problem is that when I bhop up slopes with high speed it stops jumping.
[CODE]
if not ply:IsOnGround() then
move:SetButtons( bit.band( move:Buttons(), bitnot( IN_JUMP )))
end
[/CODE]
The hook is added to SetupMove.
Check to see that the player is registered as being on the ground during these moments.
Set sv_sticktoground to 0.
[QUOTE=code_gs;51045921]Check to see that the player is registered as being on the ground during these moments.[/QUOTE]
Would it help when I create a custom check?
[editline]13th September 2016[/editline]
[QUOTE=Ott;51045934]Set sv_sticktoground to 0.[/QUOTE]
I will try that.
[editline]13th September 2016[/editline]
[QUOTE=Ott;51045934]Set sv_sticktoground to 0.[/QUOTE]
That worked. Thank you very much. What does the variable exactly do?
[QUOTE=mclucario;51045940]
That worked. Thank you very much. What does the variable exactly do?[/QUOTE]
I think, the engine makes the player stop sticking to the ground, cause when you change the gravity to negative, you don't immediately go up into the sky, until you jump.
"Added sv_sticktoground (stops players flying in the air when running up slopes)"
Found that in beta update 26 changeling.
[CODE]bitnot[/CODE]
should be changed to
[code]bit.bnot[/code]
correct me if im wrong, i would assume that OP overlooked it
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/bit/bnot]bit.bnot[/url]
[QUOTE=beeteegee;51064533][CODE]bitnot[/CODE]
should be changed to
[code]bit.bnot[/code]
correct me if im wrong, i would assume that OP overlooked it
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/bit/bnot]bit.bnot[/url][/QUOTE]
If it worked, he probably had it localised at the top; something like local bitnot = bit.bnot
Sorry, you need to Log In to post a reply to this thread.