Screwing a silencer Created 14 years ago2010-08-13 17:49:17 UTC by Mcrich114 Mcrich114

Created 14 years ago2010-08-13 17:49:17 UTC by Mcrich114 Mcrich114

Posted 14 years ago2010-08-13 17:55:26 UTC Post #284196
I noticed that there is a screw a silencer anim in the v_9mmhandgun mdl, does any one have an Idea on how I can get it to screw in mines? I already have a model for the silencer. Thanks in advance.

EDIT: I think I found the smd, its glock_reference(silencer), anyone know which bone the silencer is parented to?
Posted 14 years ago2010-08-13 19:08:31 UTC Post #284198
I believe it has it's own bone.
Just to show the model in full;
The animations for screwing the silencer on and off are just that, animations.
The silencer is a submodel, that if called by code (as it would have been at the start of the 'on' animation and the end of the 'off' animation in the HL beta when it was used) is made visible. You'd need code to make it functional, but any custom model using the silencer's animations and submodel setup should work properly.

EDIT: On further inspection, it has only the one animation (which must have been played backwards for taking it off) and the silencer is just part of the bone used on the barrel of the gun. I must have been thinking of the CS Glock.
Notewell NotewellGIASFELFEBREHBER
Posted 14 years ago2010-08-13 19:09:56 UTC Post #284199
Thanks Jeff, just want I wanted!
Posted 14 years ago2010-08-13 19:28:29 UTC Post #284200
No problem - I just hope the info is accurate enough for what you're doing.
Notewell NotewellGIASFELFEBREHBER
Posted 14 years ago2010-08-13 21:25:03 UTC Post #284202
I've noticed the silencer showing up every once in a while on random when playing Half-Life. I wonder why they removed it. Perhaps it made the AI code too complicated.
Oskar Potatis Oskar Potatis🦔
Posted 14 years ago2010-08-13 21:33:13 UTC Post #284203
I have the silencer in my mod, and the problem is the ai doesn't react to seeing other dead bodies, so basically you can pick all the ai off one by one and they won't detect a thing, even though they are within whispering range.

It's quite simple to actually code though, just change the gun volume to quiet, remove any references to the silencer code, and make the silencer a part of the main weapon .mdl, not optional.

You will need to change the sounds, the attachment needs to be moved forward to accommodate the new position of the barrel, but really it's rather simple, assuming you have any modeling, coding and sound editing skills.

Unless you want to make it optional, in which case, good luck.
Crollo CrolloTrollo
Posted 14 years ago2010-08-13 21:34:51 UTC Post #284204
well, valve provided silent pistol sounds

so you're all set on those.
Suparsonik SuparsonikI'm going off the edge to meet my maker.
Posted 14 years ago2010-08-13 21:37:07 UTC Post #284205
Yeah, that's exactly what i did, for some reason i couldn't simply change it from pl_gun3 to 2, but unless you want a non silenced pistol in there as well you can replace 3.

Good luck with your project.
Crollo CrolloTrollo
Posted 14 years ago2010-08-13 23:24:55 UTC Post #284208
to allow the ai to react to dead bodies, you could make the body spawn some kind of entity that when the ai see it, they go into their alert mode and come looking for you.. not sure which exact entity would work however
Posted 14 years ago2010-08-14 00:30:16 UTC Post #284209
Wow, thanks for the responses guys! I haven't declared the project online yet, but as soon as I get a demo set up I will (Better to come prepared)
Posted 14 years ago2010-08-20 19:34:17 UTC Post #284414
good luck
Suparsonik SuparsonikI'm going off the edge to meet my maker.
You must be logged in to post a response.