You can define your own actions in a player's Action menu. The format of the function is:
player addAction ["name","script.sqs"]
This will add a new item to the player's Action menu. "name" is the menu line text to be displayed for the action. When the action is selected from the menu, the script named "script.sqs" will start.
You can add these actions only to a player's unit, not to
AI units. This is further improved in OFP's US
release and in the OFP
Ultimate Upgrade 2 patch. When you use this for multiplayer missions, use the name of the unit instead of
the word "player" in the previous example.
You can also remove these actions. You need to set an "ID" for the "addAction" function, as in the following example:
id = player addAction ["name","script.sqs"]
"id" is a variable, where the ID of this particular action is stored. Use the following function to remove an added action from the action menu:
player removeAction id
Unfortunately, there is a bug that limits you to removing only the first added action. This has been corrected in the US version and in the OFP Ultimate Upgrade 2 patch.
(Source: Viktor Bocan, BIS Lead Mission Designer).