Jump to content
blazinone

A3 - High Command "Custom" commands /actions menu?

Recommended Posts

This is very tricky thing to find info on and I have exhausted all of my resources. I have found information on the Communications Menu (https://community.bistudio.com/wiki/Arma_3_Communication_Menu), but that is NOT what I'm looking for. I have also researched "addAction" but that is also not what I want (at least not the way I got it to work).

 

Problem: When you are in High Command and you select a single unit and press '9', you get a menu that has 'Supports' and 'Custom' on it. Supports can be added via script, I've done that before. But how do you add an item to the 'Custom' menu?

 

My goal: I'd like to be able to attach custom commands to specific units (e.g. squads) that can be initiated by the commander only. The command will be something like "Go Dark" which will add night vision and suppressors to everyone (the code is trivial). But I want to be able to do it remotely (e.g. via radio command).

 

Please note: That setting Waypoints controlled via Radio Alpha, Bravo,etc) are NOT what I want. Triggers are a possibility but seem very hacky (e.g. I need an option for "Go Dark" and "Go Light" - so that would mean having multiple triggers - and having the unit move to specific spots in order to gear up the way I want them. Hack city. Another example would be commanding a vehicle unit to turn lights on or off. Or open a particular door. Or to land. Or to tell a unit to fire smoke to signal his location. So many uses...

 

I just need to know how to add something to that menu and I'm good (I know how to do all the other stuff).

 

More details: I generally do my scenario building with the 2D editor and use as little scripting as possible. I'm not afraid of scripting though. I am working on a SP scenario but if something works for MP too it would be nice.

 

Any helpful hints would be appreciated. Thank you. And here's a gift.

 

A github repo with my better shared scenarios:

https://github.com/smillwith?tab=repositories

 

Share this post


Link to post
Share on other sites

But how do you add an item to the 'Custom' menu?

I dont believe you can. This option is filled internally by using custom sounds see Configuring Custom Sounds.

 

The only USER menus are..

 

BIS_fnc_addCommMenuItem_menu

available from any of the support menus..

single unit command (F1 - F?) > supports

commanding mode > supports (although very useful for some unknown reason they have seen fit to remove commanding mode unless you add it back yourself in your profile file)

navigate menu > reply > supports

HC commanding mode > supports

 

BIS_MENU_GroupCommunication

HC navigate menu > reply > supports

 

HC_Targets_0

HC navigate menu > targets (although i can not get this one to work)

 

HC_Missions_0

HC navigate menu > Missions

 

HC_Custom_0

HC navigate menu > Actions (this is likely the one your after) <<<<<<<<

 

HCWPWaitUntil

HC > map > right clcik WP > wait until (can not get this one to work either)

 

HCWPWaitRadio

HC > map > right click WP > Radio (can not get this one to work either)

 

Wondering if the ones i can not get to work (Targets, Wait and Radio) is because they are auto filled and as such are wiped by the act of opening the menu?

 

Some test code..

{
    missionNamespace setVariable [ format[ "%1", _x ],
        [
            ["TEST",true],
            [_x, [12], "", -5, [["expression", "hint 'test'"]], "1", "1"]
        ]
    ]
}forEach [
    "BIS_fnc_addCommMenuItem_menu",
    "BIS_MENU_GroupCommunication",
    "HC_Targets_0",
    "HC_Missions_0",
    "HC_Custom_0",
    "HCWPWaitUntil",
    "HCWPWaitRadio"
];
Just run the above from the debug console and open the above mentioned menus to see whats available.

 

Share this post


Link to post
Share on other sites

Does HC actually work for you guys in DEV branch, unless I've missed something all I can do is select the group, setwaypoint ect does nothing anymore, I don't even see any of the Nato type icons.

Share this post


Link to post
Share on other sites

Just updated my Dev branch to have a look. Works fine here other than the overhead markers which spits out an error on preview about errors in the MARTA fsm.
Scratch that, menus show up ok but you can not get them to do anything.

Share this post


Link to post
Share on other sites

 

I dont believe you can. This option is filled internally by using custom sounds see Configuring Custom Sounds.

...

Just run the above from the debug console and open the above mentioned menus to see whats available.

 

 

That's a very impressive response. Thank you very much!

 

My somewhat naive brain tells me that adding items to that Custom Menu would be the FIRST thing they/BIS would support. I have looked and looked and not seen anything related to it however.

 

The info you have provided is a great leg up on giving me some options to leverage. Thanks again!

Share this post


Link to post
Share on other sites

Wow, I'm blown away with how well all of those worked! I didn't realize the 'test code' would actually be functional code!

 

It is very handy to see them in action. It took me a while to decipher what was going on exactly with the code but I managed to get it down to this:

//Creates a menu and a menu item on for High Command
missionNamespace setVariable [
  "HC_Custom_0",
  [
    ["My Menu Name", true],
    ["My Menu Item", [12], "", -5, [["expression", "hint 'test'"]], "1", "1"]
  ]
];

3ocW6yk.png

 

Cheers!

Edited by blazinone

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

×