Jump to content

Disable Rockets on aircraft?


HarryNutz

Recommended Posts

Would like to know if there is a way to disable the rockets on Jets and the new Y-32 VTOL but still allow the gatling/machinegun... currently setup to kick if you use rockets, but of course that stinks because then players end up losing their vehicle in the process. Any help would be appreciated.

Link to comment
Share on other sites

Here the most imortant weapons / magazines to remove:

Run the Script, after all Vehicles are on the Map!

When a Vehicle is bought, it will get the Weapons back! You could run this script in a loop (not the best way) or add these lines to the vehicle spawn from Epoch.

Spoiler

            _allvehicles = allmissionobjects "Landvehicle" + allmissionobjects "Air" + allmissionobjects "Ship" + allmissionobjects "Tank";
            {
                if (!isnull _x) then {
                    _x removeMagazinesTurret ["24Rnd_missiles",[-1]];
                    _x removemagazinesturret ["200Rnd_40mm_G_belt",[0]];
                    _x removeWeaponGlobal "missiles_DAR";
                    _x removeWeaponGlobal "gatling_30mm";
                    _x removeWeaponGlobal "gatling_20mm";
                    _x removeWeaponGlobal "missiles_DAGR";
                    _x removeWeaponGlobal "cannon_30mm_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Missile_AA_03_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Missile_AGM_01_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Rocket_03_HE_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Rocket_03_AP_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Bomb_03_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Bomb_04_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Rocket_04_AP_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Rocket_04_HE_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Missile_AGM_02_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Missile_AA_04_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Gatling_30mm_Plane_CAS_01_F";
                    _x removeWeaponGlobal "GBU12BombLauncher_Plane_Fighter_03_F";
                    _x removeWeaponGlobal "missiles_ASRAAM";
                    _x removeWeaponGlobal "missiles_SCALPEL";
                    _x removeWeaponGlobal "Twin_Cannon_20mm";
                    _x removeWeaponGlobal "missiles_Zephyr";
                    _x removeWeaponGlobal "rockets_skyfire";
                    _x removeWeaponGlobal "gatling_30mm_vtol_02";
                };
            } forEach _allvehicles;
 

 

Link to comment
Share on other sites

2 hours ago, He-Man said:

Here the most imortant weapons / magazines to remove:

Run the Script, after all Vehicles are on the Map!

When a Vehicle is bought, it will get the Weapons back! You could run this script in a loop (not the best way) or add these lines to the vehicle spawn from Epoch.

  Reveal hidden contents

            _allvehicles = allmissionobjects "Landvehicle" + allmissionobjects "Air" + allmissionobjects "Ship" + allmissionobjects "Tank";
            {
                if (!isnull _x) then {
                    _x removeMagazinesTurret ["24Rnd_missiles",[-1]];
                    _x removemagazinesturret ["200Rnd_40mm_G_belt",[0]];
                    _x removeWeaponGlobal "missiles_DAR";
                    _x removeWeaponGlobal "gatling_30mm";
                    _x removeWeaponGlobal "gatling_20mm";
                    _x removeWeaponGlobal "missiles_DAGR";
                    _x removeWeaponGlobal "cannon_30mm_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Missile_AA_03_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Missile_AGM_01_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Rocket_03_HE_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Rocket_03_AP_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Bomb_03_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Bomb_04_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Rocket_04_AP_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Rocket_04_HE_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Missile_AGM_02_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Missile_AA_04_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Gatling_30mm_Plane_CAS_01_F";
                    _x removeWeaponGlobal "GBU12BombLauncher_Plane_Fighter_03_F";
                    _x removeWeaponGlobal "missiles_ASRAAM";
                    _x removeWeaponGlobal "missiles_SCALPEL";
                    _x removeWeaponGlobal "Twin_Cannon_20mm";
                    _x removeWeaponGlobal "missiles_Zephyr";
                    _x removeWeaponGlobal "rockets_skyfire";
                    _x removeWeaponGlobal "gatling_30mm_vtol_02";
                };
            } forEach _allvehicles;
 

 

Thanks for the reply He-Man. I noticed you have gatling, cannon and belt listed in there and only want the rockets disabled. Can you check my edit of your code to make sure it's ok since I am not really familiar with any of this... that's the head admins job lol.

 

            _allvehicles = allmissionobjects "Landvehicle" + allmissionobjects "Air" + allmissionobjects "Ship" + allmissionobjects "Tank";
            {
                if (!isnull _x) then {
                    _x removeMagazinesTurret ["24Rnd_missiles",[-1]];
                    _x removeWeaponGlobal "missiles_DAR";
                    _x removeWeaponGlobal "missiles_DAGR";
                    _x removeWeaponGlobal "Missile_AA_03_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Missile_AGM_01_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Rocket_03_HE_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Rocket_03_AP_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Bomb_03_Plane_CAS_02_F";
                    _x removeWeaponGlobal "Bomb_04_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Rocket_04_AP_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Rocket_04_HE_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Missile_AGM_02_Plane_CAS_01_F";
                    _x removeWeaponGlobal "Missile_AA_04_Plane_CAS_01_F";
                    _x removeWeaponGlobal "GBU12BombLauncher_Plane_Fighter_03_F";
                    _x removeWeaponGlobal "missiles_ASRAAM";
                    _x removeWeaponGlobal "missiles_SCALPEL";
                    _x removeWeaponGlobal "missiles_Zephyr";
                    _x removeWeaponGlobal "rockets_skyfire";
                };
            } forEach _allvehicles;       

 

Link to comment
Share on other sites

4 minutes ago, Sneer said:

If you get this working could you maybe post what you used and where you put it? I'd like to use something like this too.

 

Thanks

Sure np... I believe our head admin will be working on this, this coming weekend... once done I will be sure to post back.

Link to comment
Share on other sites

1 hour ago, He-Man said:

Okay, finished and it works.

Here the Changes:

https://github.com/EpochModTeam/Epoch/pull/605/files

 

Edit:

Edited some variables. Please check again!!!

I made the changes, everything loads with no errors. However, I spawn an O_Plane_CAS_02_F using the admin menu and it still has all loaded armaments (Cannon_30mm, Missile_AA, etc.)

I edit all of the files you listed, was there anything outside of that?

 

Link to comment
Share on other sites

Epoch AH or Infistar?

Not sure, how the Admin Tool spawn the Vehicles. Could be, that it use an own script.

Try Spawning two Vehicles

 - sell and purchase one back on trader and check again

- Restart the Server and check the 2nd one

 

Edit:

I have checked it.

Epoch AH and Infistar uses their own Vehicle Spawn scripts. So the changes only take effect on spawned / loaded Vehicles by Server Restart and Trader

Link to comment
Share on other sites

16 minutes ago, He-Man said:

Epoch AH or Infistar?

Not sure, how the Admin Tool spawn the Vehicles. Could be, that it use an own script.

Try Spawning two Vehicles

 - sell and purchase one back on trader and check again

- Restart the Server and check the 2nd one

 

Edit:

I have checked it.

Epoch AH and Infistar uses their own Vehicle Spawn scripts. So the changes only take effect on spawned / loaded Vehicles by Server Restart and Trader

 

Epoch AH

I spawned, sold then purchased and it worked.

I'll have to restart the server to check the second one.

So the Admin tool is what is spawning it outside your changes.

 

4 minutes ago, He-Man said:

Now I have added Changes to server_securityfunctions.sqf.

Can you please also add these changes and test again with the Admin tool?

I'll do that now.

Link to comment
Share on other sites

40 minutes ago, He-Man said:

Epoch AH or Infistar?

Not sure, how the Admin Tool spawn the Vehicles. Could be, that it use an own script.

Try Spawning two Vehicles

 - sell and purchase one back on trader and check again

- Restart the Server and check the 2nd one

 

Edit:

I have checked it.

Epoch AH and Infistar uses their own Vehicle Spawn scripts. So the changes only take effect on spawned / loaded Vehicles by Server Restart and Trader

 

Epoch AH

I spawned, sold then purchased and it worked.

I'll have to restart the server to check the second one.

So the Admin tool is what is spawning it outside your changes.

 

27 minutes ago, He-Man said:

Now I have added Changes to server_securityfunctions.sqf.

Can you please also add these changes and test again with the Admin tool?

 

Ok so the restart dearmed the armed CAS, and the admin tool spawns the CAS with the changes you made.

Looks good He-Man.

This is something that has been long over due for me .. thanks for the changes and I really hope they make it to the build. :)

Link to comment
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
  • Advertisement
  • Discord

×
×
  • Create New...