Profile image

Selected Weapon Jettison

6,510 FartResidue  10 days ago

Don't you hate it when you wanna jettison a heavy weapon that's weighing your plane down, but pressing the activation group for jettison will remove all of the weapons from your aircraft?
Struggling to decide which weapons to jettison, or have activation groups to wasted on jettison controls?
Well I have the solution, Its called “Selected Weapon Jettison” and as the name suggests, it allows you to jettison only the weapon type you currently have selected.
.
.
First of all you will need to choose which activation group you want to use to enable the jettison mode, for this example we will use Activate7
.
.
Next, you will need to disable your weapons from firing while they are being jettisoned, since we will be using FireWeapons as the jettison button. To do this, set the weapons activation group to clamp01(Activate7!=1) using the XML editor
*If you are using a different activation group, you'll need to set keep the ! Exclamation mark at the end or this wont work
.
.
.
Now that your weapon won't fire, you can set the activation group of the Pylon your weapon is on to
.
(Activate7&SelectedWeapon ="YourWeaponName"&FireWeapons)
.
if you want to disable jettison during combat, you can also use
.
(Activate7&SelectedWeapon ="YourWeaponName"&FireWeapons&!(TargetLocked))
.
*Copy the whole line, even if it isn't in red text (I had to change it due to formatting issues)
.
.
.
Finally, you will need some way to indicate that the weapon is in the Jettision mode, so that it is not accidentally left turned on.
You will need to find the weapon that fires last (This is typically the one farthest from the middle), and then attach a cannon to the pylon of that weapon using the connection editor. Then use fine tuner to set the Cannons Y position equal to the weapons Y position, and set the weapons X position to any value greater than the weapons X position.
Open the XML editor for the cannon and set massScale to 0 then set calculateDrag to false and reduce the scale values (X,Y, and Z) until it is hidden within either the pylon or the missile.
Finally select the Cannon dropdown in the XML editor, set the activationGroup to 7 (or the activation group you wanna use) Then set the Cannons name value to the name of the weapon you are jettisoning, and set the ammo count to -1
This -1 will indicate that when fired, the weapons will be jettisoned.
(This step is not strictly necessary, but I think it ties everything together nicely and improves the user experience)
.
.
.
Now you are done, To use it, you press the activation group, select a weapon group, and Jettison it by pressing Fire Weapons then turn off the activation group and continue to fly normally.
.
.
.
If you want a challenge, you can set up a system that only jettisons a singular munition/round of the selected weapon. You should be able to do this using custom variables, but I haven't tried it, as I'm still learning how to use them. An easier way would be assigning each individual weapon a unique name by adding an extra space at the end of each weapon's name.
.
.
.
I plan on making more tutorials for stuff like this, so stay tuned for more.