Jump to content
Sign in to follow this  
blackpixxel

Two muzzles in one weapon

Recommended Posts

Hi,

here is another question that I cannot solve after hours of searching, trial and error:

For a shotgun with two independent magazines I need two different muzzles to simulate this.

I already looked at the configs of weapons with underbarrel grenade launcher. But I don't understand how I should adapt that to my case. What I want is basically two guns in one. Both barrels should have everything exactly the same. The gun just has to be able to change between both magazines via "F", just like you would change between Rifle and UGL.

I hope that you can give me a hint.

Thank you!

BlackPixxel

Share this post


Link to post
Share on other sites

Off the top of my head I think it goes like this.

The underbarrel grenade launcher has a separate class: class UGL for example and in a weapon class that has said grenade launcher there would be a line in the class config

muzzles[] = {this, UGL}

and by this the weapon has "this" muzzle which is the classes own muzzle and then the UGL muzzle that has its own parameters

You could have a class shotgun_main and class shotgun_secondary with the different magazine types and have the "muzzles[]" in the class shotgun_main as muzzles[] = {this, shotgun_secondary}

Share this post


Link to post
Share on other sites

Thank you so far!

I now just copied the first shotgun class into the config and added the new class to the muzzle of the first one.

But ingame i cannot access the second class / muzzle via "F". Nothing happens there.

Is there something else to do?

Share this post


Link to post
Share on other sites

you could look into roberts Hammers A2 M4s there are m4 with Shotguns.

Share this post


Link to post
Share on other sites

Oh yeah, the M4 Masterkey! Thanks for the hint!

Na wenn das nicht der [TF47]Meat ist

Share this post


Link to post
Share on other sites

Nice, after taking a look at Robert Hammers solution I finally understood it. Now it is fully working as I wanted.

Thank you both for your help!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×