Jump to content

Recommended Posts

How to make the command executing some skript and move there some variable like:

["Request fiteteam", [2], "", -5, [["", "i=1;execVM 'ar\sar.sqf';"]], "1", "1"],

Share this post


Link to post
Share on other sites

Maybe this :-

["Request fireteam", [2], "", -5, [["expression", "i=1;execVM 'ar\sar.sqf'"]], "1", "1"],

Share this post


Link to post
Share on other sites

 

Maybe this :-

["Request fireteam", [2], "", -5, [["expression", "i=1;execVM 'ar\sar.sqf'"]], "1", "1"],

Yeah, thank you ,

What is the expression mean?

Share this post


Link to post
Share on other sites

Yeah, thank you ,

What is the expression mean?

 I have to say I don't know, it just makes it work in my codes.

Share this post


Link to post
Share on other sites

Can't add anything to communication menu.

 

class CfgCommunicationMenu
{
    class ccomma
    {
        text = "Mark by smoke";
        submenu = "";
        expression = "[]execvm'sma.sqf';";
        icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\call_ca.paa";
        cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa";
        enable = "1";
        removeAfterExpressionCall = 0;
    };
        class ccomm
	{
	    text = "Drop oc0";
	    submenu = "";
	    expression = "[]execVM'sm.sqf';";
	    icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\supplydrop_ca.paa";
	    cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa";
	    enable = "1";
	    removeAfterExpressionCall = 1;
	};
};

Is something wrong?

Share this post


Link to post
Share on other sites

Yeah, thank you ,

What is the expression mean?

As I understand it from looking at this, the "expression" in that array is the very "expression" as defined in the CfgCommunicationMenu. So I wonder if it's even possible to put the other labels like "text" or "enable" in there as well.

Share this post


Link to post
Share on other sites

As I understand it from looking at this, the "expression" in that array is the very "expression" as defined in the CfgCommunicationMenu. So I wonder if it's even possible to put the other labels like "text" or "enable" in there as well.

 

no the "expression" doesnt need to be defined in CfgCommunicationMenu. the expression can be any code you like. infact you dont need CfgCommunicationMenu at all. You need it only when defining custom support menu (keys 0-8).

 

slightly modified example (from the wiki):

class CfgCommunicationMenu
{
class myArtillery
{
text = "Artillery Strike"; // Text displayed in the menu and in a notification

submenu = "#USER:MENU_COMMS_1"; // Submenu opened upon activation (expression is ignored when submenu is not empty.)
expression = "player setVariable ['BIS_SUPP_request', ['Artillery', _pos]];"; // Code executed upon activation

icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\artillery_ca.paa"; // Icon displayed permanently next to the command menu
cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected
enable = "1"; // Simple expression condition for enabling the item
removeAfterExpressionCall = 1; // 1 to remove the item after calling
};
};

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

×