Jump to content
Nyghtfall

Change built-in nodes of a planemodel as selectable weapons - how to?

Recommended Posts

Hi there,

sorry for coming up with stuff, that probably has been done all the time, but right now I'm to stupid, to find the solution. :dntknw:

Here's the situation: I use a stock planemodel which has cannons built into the model (nodes are Gun_Left and Gun_Right). What do I have to change/create to have those guns as optional armament (some sort of gunpod would be nice, but setup as droptank would be ok too), showing up on the model only when I select them in the loadout menu. In the end I think it has to work similar to the built-in droptank mechanic.

Obviously I'm a bit rusted - I tried some things, but the guns always show up - selected or not.

Here are the relevant parts of the 3 files:

A-4G_Guns.jpg.05f788f9d7762b0e52f90fa81088dc18.jpg

Thanks in advance for your help!

Share this post


Link to post
Share on other sites

why not make a normal gun pod with ModelNodeName=Gun_left/Right ?

 

I think you are overthinking this...

 

Clipboard09.thumb.jpg.39488fcfedbfcb228f81424757320f98.jpg

  • Like 1

Share this post


Link to post
Share on other sites

If it's part of the main LOD, you can remove with the  ye ole remove component trick. but you can't add them back. you'd have to have two (or one large add-on LOD, like the IRM rails for the Pakistani J-6 Farmer), and add them via the normal way in the data and loadout inis. Obviously, you'd need someone to build the 2 gunpods or one large set of gun pods. But you'd still need to "mount" the ammo someplace (ie: 2 seperate pods would be best)

Then, they become just another weapon to be added.

  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, yakarov79 said:

why not make a normal gun pod with ModelNodeName=Gun_left/Right ?

 

I think you are overthinking this...

 

Clipboard09.thumb.jpg.39488fcfedbfcb228f81424757320f98.jpg

This should work and would be the easiest 

  • Like 1

Share this post


Link to post
Share on other sites

Take a look at some of the stock Lightnings, their gunpack works similarly to what you want to achieve.

  • Like 2

Share this post


Link to post
Share on other sites

Hey guys,

thanks for your advices!

I changed all inis according to your input. I didn't know about the Lightning-gunpack...very interesting. Earlier I only had a look at Harriers and MiG-21PFMs, but their gunpacks are fixed on the stockmodels.

The guns are now selectable in the loadoutmenu and show up on the plane, only when selected. Thats the good news. Unfortunately I cannot figure out, why the guns won't fire anymore... The gun itself (20MM_MK12) works fine on other planes, other gunpods on my plane (A-4G_67) also fire as expected, but the gun-mod doesn't. I compared all inis to other planes, gunpods, guns, etc. but I still don't understand, what the problem is.

That's what I have right now:

A-4G_Guns.thumb.jpg.c0169c0c72cf84cce07d8a6600e0092e.jpg

Share this post


Link to post
Share on other sites
1 hour ago, Nyghtfall said:

The guns are now selectable in the loadoutmenu and show up on the plane, only when selected. Thats the good news. Unfortunately I cannot figure out, why the guns won't fire anymore... The gun itself (20MM_MK12) works fine on other planes, other gunpods on my plane (A-4G_67) also fire as expected, but the gun-mod doesn't. I compared all inis to other planes, gunpods, guns, etc. but I still don't understand, what the problem is.

I noticed to things:

1. Try 'MaxRounds' instead of 'MaxAmmo'.

2. You might also need to add the line 'AimDirection=0.000000,1.000000,0.000000' under 'LightPosition='.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks alot! It was Nr. 1. I never noticed, that for internal cannons it's "MaxAmmo", but for the Gunpod in needs to be called "MaxRounds". You never stop learning.

Now it's working as intended!

Thanks to all involved! :drinks:

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..