Jump to content

Recommended Posts

10 hours ago, Jnr4817 said:

Eden Editor 
Added: Leaflets can be now equipped for Utility Drones through the "Pylon Settings" tab

Anyway you could add the Leaflets to available munitions. Would be cool to have other aircraft drop leaflets instead of just drones.

 

Humbly,

Reed

No idea what you're talking about, already possible with

GOM_fnc_allowAllPylons = true;

 

vmDxJJm.jpg

 

Sometimes it really pays off reading stuff out of the config files, heh.

 

:yay:

 

Be aware that this only adds the weapon, to make leaflets work you probably need to initialize some function on the plane first or add custom leaflets to the description.ext.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites

would there me a to use this if you didnt mind, to just switch the weapon ownership to pilot instead of gunner, without remove and readd everything?

Share this post


Link to post
Share on other sites
33 minutes ago, UDIE said:

would there me a to use this if you didnt mind, to just switch the weapon ownership to pilot instead of gunner, without remove and readd everything?

Not possible, that's how setPylonLoadout command works, only sets ownership when a pylon is being added.

On top of that there's no command to check which turret can operate the pylon so I need to handle this stuff when adding a pylon.

 

You only need to set the pylons up once, since all this information will be stored inside the preset if you create one.

 

Cheers

Share this post


Link to post
Share on other sites
13 hours ago, Grumpy Old Man said:

No idea what you're talking about, already possible with


GOM_fnc_allowAllPylons = true;

 

vmDxJJm.jpg

 

Sometimes it really pays off reading stuff out of the config files, heh.

 

:yay:

 

Be aware that this only adds the weapon, to make leaflets work you probably need to initialize some function on the plane first or add custom leaflets to the description.ext.

 

Cheers

I must not have scrolled far enough down to see them in the list. I did a quick test today and they are there. :icon_bash:

 

Without initializing on the aircraft, I found the custom leaflet for the description.ext. I am going to see if I can get it to work.

class CfgLeaflets
{
	class West // Configuration for 1Rnd_Leaflets_West_F
	{
		text = "Text of the leaflet"; // Text shown when previewing the leaflet full-screen. Ideally should be localized, so even player who cannot read the image can get the information
		texture = "myLeaflet_ca.paa"; // Leaflet texture shown when previewing the leaflet full-screen
		model = "myLeaflet.p3d"; // In-flight model. Generic white leaflet is used when not defined.
	}
};

Thanks for the help,

Reed

Share this post


Link to post
Share on other sites

I had been thinking more along the lines of  a script that may use some of your functions that would find and replace any missiles (for the pilot to control) at the start of a mission with no ui.. maybe heli pylons are not sufficiently supported yet, the problem with the ah99 crashing the game if you give pilot missile control.. i mean.. 

 

Share this post


Link to post
Share on other sites
44 minutes ago, UDIE said:

I had been thinking more along the lines of  a script that may use some of your functions that would find and replace any missiles (for the pilot to control) at the start of a mission with no ui.. maybe heli pylons are not sufficiently supported yet, the problem with the ah99 crashing the game if you give pilot missile control.. i mean.. 

 

Why not just use setPylonLoadout?

If giving the pilot missile control crashes the game file a bug report and don't use it til fixed.

 

Cheers

Share this post


Link to post
Share on other sites

 Yes ill look at file a bug report, it  is easy to reproduce in a simple script.  it only seems to be the ah99,  i tested it yesterday in your mission just changing the default weapons over to pilot control, not change the amount or placement, still get the crash. 

    im hoping in the future more choppers use this system :)

Share this post


Link to post
Share on other sites

Grumpy,

When this script pulls from the config for all of the weapons for allow all pylons, does this also include the de-mining bombs for the drones? I haven't been at home since the release and had some free time to lurk the forums.

 

Thanks

Share this post


Link to post
Share on other sites
3 minutes ago, Jnr4817 said:

Grumpy,

When this script pulls from the config for all of the weapons for allow all pylons, does this also include the de-mining bombs for the drones? I haven't been at home since the release and had some free time to lurk the forums.

 

Thanks

 

Yep, as seen in the picture above.

Everything that is configured as a pylon weapon will be pulled from the config and added to the menu, per default restricted to compatible pylons only but can be changed in the parameters file as mentioned in the first post.

 

Cheers

Share this post


Link to post
Share on other sites
Just now, Grumpy Old Man said:

 

Yep, everything that is configured as a pylon weapon will be pulled from the config and added to the menu, per default restricted to compatible pylons only but can be changed in the parameters file as mentioned in the first post.

 

Cheers

That is excellent.

Share this post


Link to post
Share on other sites

I am using this spawn GOM_fnc_addAircraftLoadoutToObject on a billboard as an addAction. Selecting my action does not bring up the loadout menu, I lower my weapon, try again and nothing appears, I get in the aircraft, try again and still nothing. I have this spawn GOM_fnc_addAircraftLoadout; in my initplayerlocal.sqf file.

 

What am I missing, I can't seem to get the loadout menu to load for anyone.

 

EDIT: I see it adds it's own Action, my addAction command was messing it up. Nevermind :)

  • Like 1

Share this post


Link to post
Share on other sites

Nice Script, thx

 

While using ACE3, none of the supportvehicles are recognized by the script. is there a work around for this issue?

I know that I get it to work by setting the "needs..source" to false, but i would like to keep this function alive.

Share this post


Link to post
Share on other sites
9 hours ago, JoeKrtz said:

Nice Script, thx

 

While using ACE3, none of the supportvehicles are recognized by the script. is there a work around for this issue?

I know that I get it to work by setting the "needs..source" to false, but i would like to keep this function alive.

My script was made with vanilla functionality in mind, if any other mod changes vanilla functionality it might break my script.

To circumvent it you can find GOM_fnc_setAmmoCargo,  GOM_fnc_setFuelCargo  and  GOM_fnc_setAmmoCargo functions in the first post under "Functions for mission makers:" section, maybe this will fix your issue.

 

Cheers

Share this post


Link to post
Share on other sites
4 hours ago, Grumpy Old Man said:

My script was made with vanilla functionality in mind, if any other mod changes vanilla functionality it might break my script.

To circumvent it you can find GOM_fnc_setAmmoCargo,  GOM_fnc_setFuelCargo  and  GOM_fnc_setAmmoCargo functions in the first post under "Functions for mission makers:" section, maybe this will fix your issue.

 

Cheers

Thx buddy, I will play around with this and let you guys know if it works

Share this post


Link to post
Share on other sites
10 hours ago, JoeKrtz said:

Thx buddy, I will play around with this and let you guys know if it works

 working like charm :)

  • Like 1

Share this post


Link to post
Share on other sites

Hello, is there a way to change the GOM_fnc_addAircraftLoadoutArea? Cause I want it to be an addAction instead of BIS_fnc_addCommMenuItem. Because since we have mods in game when we press "0" then "8" it clashes with the mod's keybind so it would be better for it to be an addAction. I'm not really good at scripting I tried doing it myself but I just can't maybe I can ask for help? I really prefer using a trigger area instead of an "object" or like player restriction. Thanks in advance.

PS: Also the GOM_fnc_removeAircraftLoadout is it possible to use removeAction instead of the current. "[_unit,_ID] call BIS_fnc_removeCommMenuItem;" so when you're out of the trigger area the added action will be removed. So still basically the same idea but instead of the CommMenuItem it'll be addAction.

Share this post


Link to post
Share on other sites
3 hours ago, kohara_02 said:

Hello, is there a way to change the GOM_fnc_addAircraftLoadoutArea? Cause I want it to be an addAction instead of BIS_fnc_addCommMenuItem. Because since we have mods in game when we press "0" then "8" it clashes with the mod's keybind so it would be better for it to be an addAction. I'm not really good at scripting I tried doing it myself but I just can't maybe I can ask for help? I really prefer using a trigger area instead of an "object" or like player restriction. Thanks in advance.

PS: Also the GOM_fnc_removeAircraftLoadout is it possible to use removeAction instead of the current. "[_unit,_ID] call BIS_fnc_removeCommMenuItem;" so when you're out of the trigger area the added action will be removed. So still basically the same idea but instead of the CommMenuItem it'll be addAction.

Those functions you mention are merely a demonstration I added to showcase different ways to add the menu to the mission, locally hosted MP and dedicated server compatible.

So I'm not gonna change those.

The very baseline function to call the menu is:

[player] call GOM_fnc_AircraftLoadout

The player or other object reference is needed to store variables and do range checks from, so that's the bare minimum.

Add this line to any action, trigger, whatever you seem fit for your mission, should do the trick.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites
On 9/23/2017 at 2:16 PM, Grumpy Old Man said:

Those functions you mention are merely a demonstration I added to showcase different ways to add the menu to the mission, locally hosted MP and dedicated server compatible.

So I'm not gonna change those.

The very baseline function to call the menu is:


[player] call GOM_fnc_AircraftLoadout

The player or other object reference is needed to store variables and do range checks from, so that's the bare minimum.

Add this line to any action, trigger, whatever you seem fit for your mission, should do the trick.

 

Cheers

How can I use this line with an "addAction"? When I put this in a trigger this just launches the loadout interface right when you get in the trigger area. What I really want to happen is that when a player goes in the trigger area it'll add and "addAction" on the player so they can open the Loadout Interface by scrolling down their mouse and select it in the action menu. I tried doing it this way "_service = player addAction ["Rearm", call GOM_fnc_AircraftLoadout]" but I get an error and the interface still opens right away when I get in the trigger. I'm really not good at scripting so forgive me. Thanks in advance.

 

Also on the "On Deactivation" it means that when you put a line of code in it, when the player gets out of the trigger area the "On Deactivation" line of code executes right(how I understand it)? So should I add a removeAction in there? So when the player gets out of the trigger area it'll remove the action button in their action menu?

Share this post


Link to post
Share on other sites
"_service = player addAction ["Rearm", call GOM_fnc_AircraftLoadout]"

Won't work. As stated, the bare minimum needs at least one object, taking the player as an example.

So something like this could do the trick:

//onPlayerRespawn.sqf

params ["_newUnit"];
_actionID = _newUnit addAction ["Rearm",{

	params["_object","_caller"];
	[_caller] call GOM_fnc_AircraftLoadout;

}];

Then you'd need to take care of respawn handling to reAdd the action upon respawn, so your best bet would be to put above line into onPlayerRespawn.sqf.

You could also handle the visibility/availability of the action with the addAction condition parameters, take a look at the wiki for that.

Plenty of info about this specific issue on the forums.

 

Cheers

Share this post


Link to post
Share on other sites
26 minutes ago, Grumpy Old Man said:

"_service = player addAction ["Rearm", call GOM_fnc_AircraftLoadout]"

Won't work. As stated, the bare minimum needs at least one object, taking the player as an example.

So something like this could do the trick:


//onPlayerRespawn.sqf

params ["_newUnit"];
_actionID = _newUnit addAction ["Rearm",{

	params["_object","_caller"];
	[_caller] call GOM_fnc_AircraftLoadout;

}];

Then you'd need to take care of respawn handling to reAdd the action upon respawn, so your best bet would be to put above line into onPlayerRespawn.sqf.

You could also handle the visibility/availability of the action with the addAction condition parameters, take a look at the wiki for that.

Plenty of info about this specific issue on the forums.

 

Cheers

 

Thank you! It's working now. Damn this parameters really is confusing. lol.

 

qisGl_qjQriYyzO0yzfccg.png

 

Is there a way to restrict this to only Pilots & Co-Pilots inside the Vehicle(Heli,Plane,LandVics). Like an if statement wherein only the Pilot/Driver & Co-Pilot(Heli,Planes) to see the added action? So the Passengers won't see it.

Share this post


Link to post
Share on other sites

There are three perfectly fine examples of how to do this inside my demo mission, you only have to look at them.

They are even commented.

 

I suggest doing some research first before attempting to do anything like that.

Using a trigger and global variable to hold the action ID is basically asking for trouble, especially in MP.

Best open a separate thread and ask for solutions, but try google first.

 

Cheers

  • Like 2

Share this post


Link to post
Share on other sites
6 minutes ago, Grumpy Old Man said:

There are three perfectly fine examples of how to do this inside my demo mission, you only have to look at them.

They are even commented.

 

I suggest doing some research first before attempting to do anything like that.

Using a trigger and global variable to hold the action ID is basically asking for trouble, especially in MP.

Best open a separate thread and ask for solutions, but try google first.

 

Cheers

Will do. Thank you good sir! :)

Share this post


Link to post
Share on other sites

I've seen where you can add the amount of supply to a vehicle but is there a define that simply looks for the proper supply vehicle (ex. ammo,fuel,repair ) and just allows the action. So for missions like Liberation where you can't define a particular vehicle's init, the script will just look for all vehicles of that type, or all vehicles with that particular supply on it and allow the action corresponding action to occur?

Share this post


Link to post
Share on other sites
4 hours ago, D.Tac said:

I've seen where you can add the amount of supply to a vehicle but is there a define that simply looks for the proper supply vehicle (ex. ammo,fuel,repair ) and just allows the action. So for missions like Liberation where you can't define a particular vehicle's init, the script will just look for all vehicles of that type, or all vehicles with that particular supply on it and allow the action corresponding action to occur?

That's how it currently works, the functions you mentioned are primarily for mission maker purposes, so you could add resources to objects that don't usually have them (ie. a hangar or other object).

The script looks for vehicles/objects that are configured to have transportFuel/transportAmmo/transportRepair values greater than 1 and allows the respective action, unless you change this setting in the parameters.sqf.

 

Cheers

 

Share this post


Link to post
Share on other sites

That's what I thought but the dialog is not detecting the service vehicles around me

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

×