So recently I was scrolling around Facepunch to find an option to 'smooth out' a player's movement (i.e sliding along walkable surfaces and things like that).
I thought the first place to start would be setting my player's friction to zero. This lead me to [URL="https://wiki.garrysmod.com/page/Entity/SetFriction"]this[/URL] page, explaining that the SetFriction function doesn't do squat. This is something I think should be fixed, unless of course you guys know a better way I can make players slip like butter.
I have seen on the ArcadiaServers TTT server they have a slippery event where players can slip around. Does anyone know how I can recreate something similar to this?
Thanks in advance.
It can be controlled with serverside console variables, such as sv_friction.
Thanks Robotboy, this solves my specific problem, but just out of curiousity, how can I target specific players with this?
You can't.
;(
I would make a GitHub issue if there isn't one already.
After looking around Facepunch for a bit I found [URL="https://facepunch.com/showthread.php?t=1277340"]this[/URL] thread and was brought to the GM:Move() hook, does anyone know how I might override this to remove my player's friction while still keeping basic gravity and stuff like that?
[QUOTE=KO #1;51965686]After looking around Facepunch for a bit I found [URL="https://facepunch.com/showthread.php?t=1277340"]this[/URL] thread and was brought to the GM:Move() hook, does anyone know how I might override this to remove my player's friction while still keeping basic gravity and stuff like that?[/QUOTE]
I just read a bit into this, it seems pretty difficult but definitely possible. Use SetupMove, not Move.
I've played around a bit now with the movement hook, specifically trying to set the player's physobject material to "gmod_ice" which seemed to have no effect. It's really bugging me that this isn't a thing. Is there any place I could find out how the sv_friction command works? All I'm trying to do is execute this command only on certain players, but the difficulty is in the fact that it is a server side variable.
[QUOTE=KO #1;51966564]I've played around a bit now with the movement hook, specifically trying to set the player's physobject material to "gmod_ice" which seemed to have no effect. It's really bugging me that this isn't a thing. Is there any place I could find out how the sv_friction command works? All I'm trying to do is execute this command only on certain players, but the difficulty is in the fact that it is a server side variable.[/QUOTE]
If you get a solution please let me know, I'm interested on how you do it. Thanks.
I didn't realise this thread was still here. I will copy my reply from the Problems That Don't Need a Thread:
[QUOTE=SFArial;51968702]You can't by default. What you could do is port the hl2dm movement code from the SDK to lua.
[editline]16th March 2017[/editline]
Adding onto that, here's the relevant code in the SDK:
[URL="https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/shared/gamemovement.cpp#L2025"]https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/shared/gamemovement.cpp#L2025[/URL][/QUOTE]
This is the only way, hands down. Use the various Move hooks to override player movement using parts of, or the whole of the movement code from the SDK.
Sorry, you need to Log In to post a reply to this thread.