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.
It looks like its coming along real well, about your gun holding issue, maybe just having the hand models from CSS spawned with the CSS guns and just re-texture and render it with the HL2 hands and the HL2 hands with the HL2 guns…
That’s probably your best option at this stage if its at all possible…
It isn’t the viewmodel – it’s the world model when you see another player holding the weapon.
The viewmodels work perfectly apart from the muzzle flashes.
VERY nice.
When 8.4 is released will it have game modes built in or would you just join a server and hope that they have some cool things going on?
Either way i’m hella psyched.
I remember when I was messing around with the weapons in GTA 3 and where the muzzle flash and bullet fire came from was controlled by a set of coordinates based on either the player model or the weapon model (I forget which, think it was player), but i’m not to sure if this would be the case with HL2 seeing as how in GTA3 changing things was as simple as changing a few text lines in a document, that and the many other differences between engines, but it might be worth a look into if you haven’t done so already.
I’m pretty excited about 8.4. This would make GM-Orbit much more awesomer, though I suppose any custom models would need to be distrubuted along with the map, as well as the LUA code.
I’m excited about 8.4!
I don’t know if you solved this, but the answer seems pretty simple:
To make the CSS models hold the guns correctly, wouldn’t it be fixed if you added the CSS animations to the models like you did with the other versions of Garry’s mod?
Don’t think that would work.
I was hoping to get a code based solution to get the muzzles working.. but it don’t look as if that’s possible.
I know the bonemerge system is completely different now – so if we want world models to work we’ll have to decom/recompile at least all the world models.
Can you upload a picture of the problem with the muzzleflash, so it can better help my analyze what exactly is going on?
Would it be possible to create a 2D perspective gamemode with LUA? It would look like this half life 1 mod:
Haywire http://www.hangar16.com/Features/Reviews/HL-138_Haywire.htm
If not, would this be something possible to add to GMod?
well I can’t really help any with codes, I only know a little bit and it doesn’t even involve Gmod. well,except for the console scripting stuff, come up with an EMP type thing that makes all electical based objects (assuming that the thrusters are electrical based, as well as the magnets) and either disables them (temporarily) or sets them off, and kills all rollermines, disables turrets, and sets off slams and tripmines.
it was really basic though, but quite fun
I’ve got some LUA scripts ready and I just cant wait to try ‘em out! Good luck with the muzzle flashes Garry. I hope you can get that to work to avoid having to recompile all those models :
check out this screenshot —- its amazing http://www.freewebs.com/omgroflzorshalflife2
Gmod 8.4 sounds mutch better than 8.3
i cant wait for GMOD v8.4 to be released and one question… Are u gonna make a GMOD for DOD:Source or maybe TEAM fortress 2. Now im getting anoying but is there also gonna be an update that mixes HL2: Aftermath
hey garry ithink we only can wait to v8,4 coming
can you give me a date on it?????
umm? if gmod 8.4 was released where would i dl it from? ohh and also thats some good work you got goin there