GMod 8.4 Progress

I’ve started updating the GMod 8.4 beta build on weekends. I did some pretty cool stuff this weekend.

I made it so using LUA you can override a weapon’s default settings. Things like view model, world model, damage, rate of fire, automatic/manual, fov, lefthand/right hand, clipsize, slot on the hud, classname, view kick, spray cone etc etc.

This means that scripters can create virtually new weapons. Because you can change the classname the engine thinks they’re new weapons, so you can hold more than one custom weapon.

The way the weapons work is pretty cool too. Each weapon has its own script and its own LUA state. The weapon calls functions in LUA like ‘onInit’, ‘onThink’, ‘onPrimaryAttack’, ‘getPrimaryFireRate’, ‘GetFireCone’ etc..

It works pretty well. My test was using weapon models from CS:S. They differ from Half-Life 2 weapon models in some ways which means that the player doesn’t hold them right and the muzzleflash comes from the wrong place. I’m guessing this is bone related somehow, if anyone out there knows how to fix it shoot me an email at garrynewman@gmail.com and maybe I’ll sort you out with beta access.

Here’s a couple of screenshots. [ONE] [TWO]. And some guy posted a video in the forums.

Oh also, I got to play a good new gamemode that ‘n42′ made. Football. There’s two teams, two goals, one ball. You shoot/kick the ball into the opposite goal. It worked perfectly.

I’m really happy with how easy it is to play new game modes, you literally just join a server and play.