Jump to content
  • 0

Removing Manual Fire


Guest

Question

I assumed it would be in fn_selfactions.sqf or somewhere in variables.sqf, but I can't for the life of me find it. I'm trying to disable the option to manual fire from the pilot's seat for a particular chopper (AH64D_EP1).

 

Any ideas where I can find this option to overwrite it?

 

Cheers

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

It won't be in the fnselfactions because it's inside of the Arma 2 PBO's, I'm not that good at scripting but I wrote this script up and it worked in singleplayer you can give it a try ;)

Notepad>Paste code below> name it antimanualfire.sqf>Throw it into your mission file>Put "[] ExecVM "antimanualfire.sqf";" in your init.sqf

while {(alive player) and (typeOf(vehicle player) == "AH64D_EP1")} do {
	waituntil {isManualFire vehicle player};
	player action ["manualFireCancel", vehicle player];
};
Let me know how it works out for you
Link to comment
Share on other sites

  • 0

It won't be in the fnselfactions because it's inside of the Arma 2 PBO's, I'm not that good at scripting but I wrote this script up and it worked in singleplayer you can give it a try ;)

Notepad>Paste code below> name it antimanualfire.sqf>Throw it into your mission file>Put "[] ExecVM "antimanualfire.sqf";" in your init.sqf

while {(alive player) and (typeOf(vehicle player) == "AH64D_EP1")} do {
	waituntil {isManualFire vehicle player};
	player action ["manualFireCancel", vehicle player];
};
Let me know how it works out for you

 

while {(alive player) and ((vehicle player) isKindOf 'Air')} do {
	waituntil {isManualFire vehicle player};
	player action ["manualFireCancel", vehicle player];
};

This removes for all aircrafts

Link to comment
Share on other sites

  • 0

Okay. Thanks. I was hoping I'd be able to remove it from the scroll wheel completely, but this workaround will do. Thanks for your help!

why would you remove that option anyways?

Because I've added the Apache minus all of its weapons systems. Then I replaced the main cannon (M230 if I remember correctly while not at my PC) with the M134 minigun. If I'm going to add the Apache, I want it to require 2 people to operate as a trade off for having an attack chopper with radar. I'm just trying to keep things as balanced as possible.

Link to comment
Share on other sites

  • 0

I do have one more small issue. Everything I've done to this point has worked great, but for some reason I can't seem to remove the Hydras from the Apache. I can remove the ammo and all other weapon systems and even replace the M230 with an M134, but the Hydras remain. Has anyone else successfully got rid of them? It's important because players could potentially rearm them at a gas station (another script). For the time being, I have disabled rearming of the Apache, but I want to have it in so they can rearm the M134 once I get rid of Hydras. Here is what my modifications of the Apache look like right now:

 

if (_object isKindof "AH64D_EP1") then {
         _object magazinesTurret [-1];
		 _object removeMagazinesTurret ["38Rnd_FFAR",[-1]];
		 _object WeaponsTurret [-1];
		 _object removeWeapon "FFARLauncher"; //This part doesn't seem to be working? Worked just fine when I used it to remove Hydras from AH6J
		 _object magazinesTurret [1];
		 _object removeMagazinesTurret ["8Rnd_Hellfire",[1]];
		 _object WeaponsTurret [1];
		 _object removeWeapon "HellfireLauncher";
		 _object removeWeapon "M230";
		 _object magazinesTurret [1];
		 _object removeMagazinesTurret ["1200Rnd_30x113mm_M789_HEDP",[1]];
		 _object WeaponsTurret [1];
		 _object addWeapon "M134";
	};

 

 

 

Edit: After a bit more research, it seems as though this is a well known issue that nobody has been able to resolve. I'll just create a workaround in the rearming script I use. Shouldn't be difficult.

Link to comment
Share on other sites

  • 0

It won't be in the fnselfactions because it's inside of the Arma 2 PBO's, I'm not that good at scripting but I wrote this script up and it worked in singleplayer you can give it a try ;)

Notepad>Paste code below> name it antimanualfire.sqf>Throw it into your mission file>Put "[] ExecVM "antimanualfire.sqf";" in your init.sqf

while {(alive player) and (typeOf(vehicle player) == "AH64D_EP1")} do {
	waituntil {isManualFire vehicle player};
	player action ["manualFireCancel", vehicle player];
};
Let me know how it works out for you

 

 

 

 

Your code does work, however, the way you have it written does have a small bug where if you are in the Apache and attempt to manual fire and then move to any other vehicle with a manual fire option. When you try to select manual fire mode, it cancels it, but only once. It will work fine after that. It just has to do with the order of operations, really. Here's how I edited it in case anyone is wondering (I also added in some text that pops up to let the player know it has been disabled on purpose and that it's not a bug):

 

 

while {alive player} do {
	waituntil {isManualFire vehicle player};
	if (typeOf(vehicle player) == "AH64D_EP1") then {
		player action ["manualFireCancel", vehicle player];
		cutText ["Manual fire for Apache has been disabled. You must have a gunner!", "PLAIN DOWN"];
	};
};

Thanks for your guys' input and help. Cheers!

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
  • Discord

×
×
  • Create New...