Jump to content
Sign in to follow this  
james mckenzie-smith

Custom communication menu: Problem with inserting minefield breach script

Recommended Posts

As a very small number of you may know, I am in to the whole 'High Command' feature of ArmA2/OA, and have long been displeased with certain of its well-known limitations. However, I have overcome two of these; namely, getting infantry units to board transports that are not in their own group, and also in making units wait until I tell them to proceed on their waypoints. Both of these have radically increased my enjoyment of HC, and now I am looking at other features to add.

The one that is stumping me so far is mine clearance, when nested within a sub menu of a custom communications menu. Desired behaviour is a unit or units will perform several mine clearing animations over time, so that as they move, they can sweep a lane clear for other units.

While the following works well, when merely in a radio trigger...

0=[] spawn {E220A action ["deactivateMine", E220A]; E220B action ["deactivateMine", E220B]; sleep 5; E220A action ["deactivateMine", E220A]; E220B action ["deactivateMine", E220B]; sleep 5  ...etc. so that twenty deactivateMine actions appear ... ];}

...it rather falls apart when in this structure:

[] call BIS_fnc_commsMenuCreate;

MOUNT_SUBMENU =
[
["",false],
["ACo 3Pn 1Sq BOARD", [2], "", -5, [["expression", "[AA, AB, AC, AD, AE, AF, AG] orderGetIn true"]], "1", "1"],
["ACo 3Pn 2Sq BOARD", [3], "", -5, [["expression", "[bB, BB, BC, BD, BE, BF, BG] orderGetIn true"]], "1", "1"],
["ACo 3Pn 1Sq DISMOUNT", [4], "", -5, [["expression", "[AA, AB, AC, AD, AE, AF, AG] orderGetIn false"]], "1", "1"],
["ACo 3Pn 2Sq DISMOUNT", [5], "", -5, [["expression", "[bB, BB, BC, BD, BE, BF, BG] orderGetIn false"]], "1", "1"]
];
BREACH_SUBMENU = [
["",false],
["ACo 2Pn 1Sq BREACH MINEFIELD", [2], "", -5, [["expression", "0=[] spawn {E120A action ["deactivateMine", 1220A]; E120B action ["deactivateMine", E120B]; sleep 5; E120A action ["deactivateMine", 1220A]; E120B action ["deactivateMine", E120B];}"]], "1", "1"],
["ACo 2Pn 2Sq BREACH MINEFIELD", [2], "", -5, [["expression", "0=[] spawn {E220A action ["deactivateMine", E220A]; E220B action ["deactivateMine", E220B]; sleep 5; E220A action ["deactivateMine", E220A]; E220B action ["deactivateMine", E220B];}"]], "1", "1"]
];

COMMAND_MAINMENU = 
[	
["MOUNT/DISMOUNT", [2], "#USER:MOUNT_SUBMENU", -5, [["expression", "player sidechat ""this is TEST1 (submenu)"" "]], "1", "1"],
["BREACH MINES", [3], "#USER:BREACH_SUBMENU", -5, [["expression", "player sidechat ""this is TEST2 (submenu)"" "]], "1", "1"]
];

[bIS_MENU_GroupCommunication, ["COMMAND MENU",[0],"#USER:COMMAND_MAINMENU",-5,[["expression",""]],"1","1"]] call BIS_fnc_arrayPush;

The menu appears correctly, all non-breach minefield commands work as planned, and the option to breach appears. However, where they cleared mines like men possessed in the radio trigger version, for the custom communications menu, they opt to just stand there.

Can anyone see where I am going wrong? I'm a little stumped for now...

Edited by James McKenzie-Smith

Share this post


Link to post
Share on other sites

James, you may just take over as our new HC guru ! Keep going mate. Anything you release will be gratefully received by the community.

Check out what Mr Centipede put together a while ago (I helped a tiny bit) on HC.

Share this post


Link to post
Share on other sites

I appreciate the sentiment, and I will look up Mr. Centipede's work.

Alas, I am still stumped on the question above. Any assistance would be greatly appreciated; it is more or less the last piece of the puzzle before I can say that I am satisfied with my HC experiments for now. Without the solution, the engineer company attached to modern US Army Combined Arms battalions has not got much to do in my templates...

Share this post


Link to post
Share on other sites

I am also looking in the same direction you are - working with the communication menu to have actions to deploy weapon teams in High Command, and order mortar strikes for mortar teams - I will let you know if I find anything

Share this post


Link to post
Share on other sites

do they perform the action if you change it to something else, like "salute"? What happens if you don't use spawn and just execute it like the other commands?. Have you tried putting all the minesweeping commands into a script and having the menu action call that script?

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
Sign in to follow this  

×