Home   Help Search Login Register  

Author Topic: Communication menu  (Read 3688 times)

0 Members and 1 Guest are viewing this topic.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Communication menu
« on: 21 Jul 2009, 23:20:07 »
Hellu!

Have anyone figured out how to handle the new communications menu (0-8)? BIS uses it frequently to add options, especially Module-based support, and it is often combined with the functionality of detecting what the player is pointing at. Now, I had a go at trying to figure it out myself, dePBOing files to the left and the right, but me not having scripted since the beginning of the previous century isn't exactly helping.

It'd be cool if someone would explain how to add, control and detect items in the communications menu, and especially how to detect what the player is aiming at.

Cheers!

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Communication menu
« Reply #1 on: 28 Jul 2009, 00:14:47 »
Not much is known about these menus yet. They are defined in Dta\bin.pbo and AddOns\ui.pbo (search for "RscGroupRootMenu" and keep reading).

Here's a list of condition found in the "show" parameter (note the "CursorOn..." conditions). This list contains the all(?) possible values for the "command" parameter.


The syntax for "show" seems to be something like this (where <isFoo> and <hasBar> are conditions):
SymbolMeaning
<isFoo> * <hasBar><isFoo> and <hasBar>
<isFoo> + <hasBar><isFoo> or <hasBar>
(1 - <isFoo>)not <isFoo>


There's also a "menu" parameter. For the "Communication" class it looks like this:
Code: [Select]
menu = "#User:BIS_MENU_GroupCommunication";BIS_MENU_GroupCommunication is a global variable of type array. Take a look at "Modules\Functions\misc\fn_commsMenuCreate.sqf" to see how the array has to look like.

Well, that's all... HTH!

Oh, and if you gain new insights let us know! :)
try { return true; } finally { return false; }

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re: Communication menu
« Reply #2 on: 29 Jul 2009, 05:19:18 »
Cheers for the reply! Though I did only understand about half of what you said. I'm more than a bit rusty you see. :D

But, if I do understand you correctly, we do not know as of yet how to manipulate the communication menu?

Offline Kremator

  • Members
  • *
Re: Communication menu
« Reply #3 on: 29 Jul 2009, 11:17:50 »
As of yet, it's still very early for understanding the comms menu.  HOWEVER, once it gets sorted it will open a myriad of possibilities for scripters and mission makers alike.

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Communication menu
« Reply #4 on: 07 Aug 2009, 09:50:49 »
Karel gave a reply on the BIS forum yesterday, stating that this is the format for adding to the Communication menu:

Code: [Select]
BIS_MENU_GroupCommunication = [
//--- Name, context sensitive
["User menu",false],
//--- Item name, shortcut, -5 (do not change), expression, show, enable
["Not active", [2], "", -5, [["expression", "player setdamage 1"]], "1", "0"],
["Active", [3], "", -5, [["expression", "player setdamage 1"]], "1", "1"]
];
showCommandingMenu "#USER:BIS_MENU_GroupCommunication";

No further explanation than that at present.  But this particular example would add options "Not active" and "Active" to a menu "User menu" under the main "Communication" menu.

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Communication menu
« Reply #5 on: 07 Aug 2009, 11:15:02 »
JamesF1 try

Quote
ca\Modules\Functions\misc\fn_createmenu.sqf

Found by WE.  :cool2:

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Communication menu
« Reply #6 on: 07 Aug 2009, 11:58:14 »
Ooh... :)  I just noticed the post today, and recalled someone was looking for it!