Stronghold gamemode: Realistic walking script?

Hello, a friend of mine showed me a very cool gamemode the other day called stronghold. I loved the way it was made, and what I especially liked was the animation used when your player walks and runs. I have a DarkRP server, and I was wondering if there is a way to incorporate only this into my server. The problem is that I do not know what file is used in the gamemode that does this, so does anyone know which file is used to make your player walk like this?

And that’s not all I need help with, don’t go into saying “This has nothing to do with lua at all!!” so quickly… If this code is perhaps part of the weapons in the gamemode, or is built into some key feature in the game, can anyone help me turn only the realistic walking into a lua file all its own? Maybe turn it into an autorun?

Link to the gamemode files here.

Thank you, I’m not so good with lua, I’m hoping the Gmod coding experts on this forum can help me out with this simple project.

If this is posted in the wrong place, please don’t ban me!


And if it’s easier, does anyone know of a realistic walking mod already made?

What do you mean a realistic walking mod? How does stronghold do it, change the speed, animation?

Animation, the speed I already have set to a pretty realistic one.

Okay, so it is view animation (View bobbing)?

I’m fairly confident he also means the view bobbing that RoaringCow and myself did.
This is located in STRONGHOLD/gamemode/cl_init.lua but I’m not sure of the line in the current Google Code version. Search for CalcView or “-- Overly complex camera calculations”.

Sorry I took a bit to respond, and yes, that is what I wanted the “Camera bobbing”.

Is that it? If so, how do I turn this into an autorun, or a file I can turn into an addon? I know I probably have to add a line to make it run on the server, I forgot how to do that exactly though…

Thanks for the help!

Make a file in autorun/client. You will need to change GM to GAMEMODE too.

Set it in “lua/autorun/client” as “anything.lua”? I changed the GM to gamemode.

And I’m testing this offline first, would it be the same folder if I am trying it offline?

Yes, it would work locally. On the dedicated server however you will have to AddCSLuaFile it with another script on autorun/server.


I believe.