Jump to content

addaction script help for submenu


LoKii

Recommended Posts

Hi everyone.

I wanted to ask if AhoyWorld would be willing to share a snippet from one of your scripts... specifically "addaction submenus" like you have implemented in the ghosthawk to disable the turrets. I'm not interested in the turret part, but just the way the addaction menu would look like for submenus.

 

Example, i have a custom trigger (eden), which has 5 different addactions, but that kind of clutters up my menu as a whole. I would like to add 2 submenus, and in each one put the addactions. The hard part for me is, for example that after i make a choice, the menu will not go back to it's default with what it had before i went in to the submenu. Also, please, i do not wish to add this to  an object. I would like it to be a permanent choice on my player, hence the custom trigger i made.

 

The addactions are as follows:

soldier addAction ["Extract", "land.sqf", transport, 0, false, false];
soldier addAction ["Land", "land1.sqf", transport, 0, false, false];
soldier addAction ["RTB", "RTB.sqf", transport, 0, false, false];
soldier addAction ["RTB", "AHRTB.sqf", ah, 0, false, false];

I want 2 submenus. One called "Transport Menu" and the 2nd one called "AH Menu", then the first 3 addactions to be in the first menu, and the 4th addction to be in the second menu.

Any help?

Cheers.

Link to comment
Share on other sites

I&A code is open source.  It's shared under the MIT license, all you have to do is unpack the PBO and you don't only have snippets, you'll have everything :)

 

You can find the mission file at this path on your PC:
Drive:\Users\yourUser\AppData\Local\Arma 3\MPMissionsCache

 

Download a dePBOer, you can find a few recommended ones here on the forums, just search for unpack or something like that.

The scripts you're looking for can be found at: Invade_&_Annex_3_3_7_11.Altis\Functions\TurretControl

 

Link to comment
Share on other sites

Hi Stan, thanks for reply.

Downloaded an unpacker, opened the turret part in the IA file in question, but thats all just pure about the turret itself. As i said, i just wanted help in how to create submenus for my custom addactions. It has nothing to do with the actual turret script that you have. ( I only mentioned that part as an example, so you could picture what i meant).

That code in the turret parf of the pbo is not what i need and is way to complicated for what i want to accomplish (just add 4 addactions into a submenu in the scroll menu).

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
  • Forum Statistics

    11.1k
    Total Topics
    66.4k
    Total Posts
×
×
  • Create New...