Hey. I’ve just started scripting Lua in GMod, and I have a few questions, and some things I’m confused about.
How can I change/fine-tune the boost that happens when jumping while running in a single direction? I think it’s a bit too powerful. Ideally, I want something like CS:S (I’m trying to make the “physics” in my gamemode similar).
I’m making a Fretta based gamemode, and I noticed on the wiki it said player classes must be shared, but I added debugging messages (if SERVER/CLIENT… ), and I could only ever notice the server responding. I’m not sure if it was a server only function I used, or if I need to add my class file to the client. Perhaps I just don’t understand shared files enough yet. Ideas/tips?
What should I use to alter the value of a convar? I would have thought I could figure this one out by myself, but I really can only find get methods on the wiki. The only thing I can think, is that I should alter them by using CreateConVar, but then I’m a bit confused as to what the flags and such should be.
Lastly, on the topic of CS:S physics, I noticed when jumping that it seems as though players can “step” mid-jump to get higher than they should be able to. I thought to remedy this by setting the players StepSize to “0” while a player is in the air. Regardless of if this would actually work or not, I was thinking to add, in the players Think(), some code to check when they jumped and when they landed. How would I go about saving the players state, should I use the player as a table index? What’s the preferred way of storing per player data?
Hopefully I explained things well enough, I’d appreciate help with any of these problems. Thanks~
How can I change the boost players receive with running jumps?
Are fretta classes (player_class) shared? Explain?
How can I modify the value of an existing convar?
Any advice/examples on storing per player data?