Jump to content
Sign in to follow this  
Kydoimos

AddCommandMenuItem and Instructor Figure Notifications / Supports

Recommended Posts

Hi all - totally confused with this - hence the rather garbled title for this thread. I like the supports that appear in the new campaign and I would like to try and do something similar. Essentially, what I want to do, is to add a support item. You know how the little exclamation mark or other similar icon pops up? I'd like to achieve that and then when I select the support from the menu, I'd like it to fire a script and make the icon disappear again. I have found this:

class CfgCommunicationMenu
{
   class myArtillery
   {
       text = "Artillery Strike"; [color=#0000FF][i]// Text displayed in the menu and in a notification[/i][/color]
       submenu = ""; [color=#0000FF][i]// Submenu opened upon activation (expression is ignored when submenu is not empty.)[/i][/color]
       expression = "player setVariable ['BIS_SUPP_request', ['Artillery', _pos]];"; [color=#0000FF][i]// Code executed upon activation[/i][/color]
       icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\artillery_ca.paa"; [color=#0000FF][i]// Icon displayed permanently next to the command menu[/i][/color]
       cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; [color=#0000FF][i]// Custom cursor displayed when the item is selected[/i][/color]
       enable = "1"; [color=#0000FF][i]// Simple expression condition for enabling the item[/i][/color]
       removeAfterExpressionCall = 1; [color=#0000FF][i]// 1 to remove the item after calling[/i][/color]
   };
};

So, I can add it to the description.ext ok. But I'm a bit muddled on how I call it or how I use it to call a script from the command menu. Sorry - I just need this explained to me in simple terms. I'm no pro with scripting and I'm still struggling to find my feet! Thanks for any help!

---------- Post added at 19:28 ---------- Previous post was at 18:10 ----------

http://forums.bistudio.com/showthread.php?168296-Help-creating-Custom-Communication-menu

Thanks IndeedPete - you covered it here already! However, I'd be interested to know how the InstructorFigure function works..?

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  

×