Jump to content
wyattwic

Locally mute another player via script

Recommended Posts

Hello!

 

Would anyone be able to guide me as to how to mute a player locally via a script? 

 

Currently players, if they needed to mute someone, need to go to the map, select the player and hit mute.  I have no clue what code the mute button triggers.

 

 

Thank you!

  • Like 1

Share this post


Link to post
Share on other sites

What channel do you want to mute?

 

Local, Group, Side, Every channel, just the channel they are on at that moment etc etc

 

Details pls.

Share this post


Link to post
Share on other sites

The channel being used is one of the ten custom radio channels.

 

To clarify - the goal isn't to prohibit a player from talking into a channel.   The goal is to prevent a player from hearing specific players using the same channel.

Share this post


Link to post
Share on other sites

I actually created a feature request ticket for BI to add to the game here.  From what I've seen on the BI wiki, there are no BIS functions or script commands to do this.  There's probably some kind of sophisticated way to do it, but a command to do it flat out would be much faster and more practical to use in my case.

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, phronk said:

I actually created a feature request ticket for BI to add to the game here.  From what I've seen on the BI wiki, there are no BIS functions or script commands to do this.  There's probably some kind of sophisticated way to do it, but a command to do it flat out would be much faster and more practical to use in my case.

 

I saw that in my search.  Sadly, while I know the solution is going to be something sophisticated as a solution, its something I need to achieve my goal.

 

My issue is, I know minimal about dialogs. I suspect we could find the individual control that contains that link/button and copy the code or commands it calls from there.

 

I am going to continue to try to find ways to do this, but I'm lost.

Share this post


Link to post
Share on other sites

Hey,

This could be done easily with TaskForceRadio if you are ok to add some mods.

Share this post


Link to post
Share on other sites
Just now, wyattwic said:

Hello!

 

Would anyone be able to guide me as to how to mute a player locally via a script? 

 

Currently players, if they needed to mute someone, need to go to the map, select the player and hit mute.  I have no clue what code the mute button triggers.

 

 

Thank you!

 

Just now, wyattwic said:

The channel being used is one of the ten custom radio channels.

 

To clarify - the goal isn't to prohibit a player from talking into a channel.   The goal is to prevent a player from hearing specific players using the same channel.

 

So what exactly do you want? Mute a player locally via a script? Or prevent a player from hearing specific players using the same channel?

You're contradicting yourself.

 

There's also fadeRadio/fadeSpeech.

 

Cheers

Share this post


Link to post
Share on other sites

Sorry about the delay, had a few family issues to take care of.

 

 

On 3/31/2017 at 1:32 AM, harmdhast said:

Hey,

This could be done easily with TaskForceRadio if you are ok to add some mods.

It could, but I am trying hard to avoid mods.

 

 

On 3/31/2017 at 8:24 AM, Grumpy Old Man said:

 

 

So what exactly do you want? Mute a player locally via a script? Or prevent a player from hearing specific players using the same channel?

You're contradicting yourself.

 

There's also fadeRadio/fadeSpeech.

 

Cheers

 

Hey Grumpy, let me clarify what I am hoping to achieve.

  • On a player, prevent them from hearing a specific player.
  • Preferably (optional goal) have this restriction per channel.
  • Have a local effect.

The title confusion came from the research I had already done - So far, the only way I possibly see achieving this is by activating the "Mute" link shown on the player list.  Where I am stuck on this option is, how do I activate it from a script?  Finding the dialog controls to manipulate is something I truly suck at.

 

Hence why my dumb ass made the ask of "Mute a player locally via a script".

 

Hope that helps because I am stumped lol

Share this post


Link to post
Share on other sites

Hey guys, I just got back from a stint at the hospital.  Im back to gaming! :)

 

I am still looking for a solution for this issue.  I am going to start shuffling through the functions viewer to see if I missed anything.  Can anyone recommend a tutorial or information on how to find dialog controls?  If not, could someone tell me what addon file holds the code for the map/player list and I could try to find out what the text links to.

Share this post


Link to post
Share on other sites

I am going to pass out for the night.  Here's what I found so far.

 

I was able to find "IDC_MP_MUTE" as 127, but when searching for the IDC name I cant find any other mention of it.  I am still lost as to what code that executes.

 

On the up side, I found out that N++ can search within multiple PBO files to see if a string exists, so that helped in this wide search.

 

Considering I know it's IDC, is there anything I can do with that?

 

EDIT:  For additional clarification, Phronk's feature request is asking for the same thing I am. https://feedback.bistudio.com/T124140  however I am wanting to activate whats already there.

Share this post


Link to post
Share on other sites

I guess you can => Open the map => Toggle player list => Search player in listbox => simulate click on mute.

Use alldisplays and allcontrols

  • Like 1

Share this post


Link to post
Share on other sites
12 hours ago, harmdhast said:

I guess you can => Open the map => Toggle player list => Search player in listbox => simulate click on mute.

Use alldisplays and allcontrols

 

Thanks!  Is there any way to return what that is linking to once I've found it?  Dialogs are what I need improvement on the most, but I think I can figure out simulating the click - I would however enjoy just activating the code it hits too. :)

Share this post


Link to post
Share on other sites

I just wanted to leave an update that I am still trying to find this.  I've tried a few different methods of hunting it down.   A mousebuttondown eh on display 12 (That looks like the map at least) isn't returning what I want, along with a few other methods.

 

I am sure its not this hard, but I am lost.  I am going to start un-pbo-ing everything dialog related and use N++ to search thoroughly.  I would love any other suggestions on how best to search for this.

 

Just so its known, I am trying to get whatever code clicking the Mute button in red below activates.

5nbiIG5.png

Share this post


Link to post
Share on other sites

Hey guys, I need a different kind of help now. :)

 

I was unable to identify the control that mutes a target player, but I was able to find the control associated with the mute all button.

 

Its control is ((findDisplay 12) displayCtrl 119).

 

My issue is now, I am unable to find out what it does once clicked.  How can I return what event handlers are assigned to it? 

Share this post


Link to post
Share on other sites
14 minutes ago, harmdhast said:

 

I've already checked for both.  ButtonAction retuns nil.  ctrlType returns 77.

 

I know this checkbox has a "CheckedChanged" EH, but I dont know how to return the contents of the active EHs. :(

 

I could actuate this manually, but it would mute everyone.  My goal is still to mute a specific person, I am just hoping the code revealed will show me how to target a specific person.

Share this post


Link to post
Share on other sites

Well checked myself with all the displays accessible within the uiNamespace. No Results.

No results in the fully extracted data from the pbos. Seems it's hidden in the binary ;)

  • Like 1

Share this post


Link to post
Share on other sites

Yeah, I emailed BIS to see if they'd be able to help.  This is really frustrating. :V

 

Thanks for the help, Ill post whatever comes of it when it happens.

Share this post


Link to post
Share on other sites

No luck on my end either. My best guess is it's because [Mute] is an Active Text embedded into part of the player/squad xml details pane and not its own control or button.

player groupChat "MUTE-like display controls";
{
 _disp = _x;
 {
  _ctrl = _x; 
  if (ctrlType _ctrl in[11] or toUpper(ctrlClassName _ctrl + ctrlText _ctrl) find toUpper("MUTE") > -1) then
  {
   systemChat (str(_disp) + " " + str(_ctrl) + " (" + ctrlClassName _ctrl + ") " + ctrlText _ctrl);
  };
 } forEach allControls _x;
} forEach allDisplays + (uiNamespace getVariable "IGUI_Displays");

Searching for MUTE in uppercase control classnames or texts does not find the [Mute] link but maybe other control fields should be concatenated into the find string.

Maybe I can't find it because I'm only one player on the server. Oh well, regardless of finding it, I also struggle to activate non-buttons or get their associated action.

Share this post


Link to post
Share on other sites

removed.  I just realized I re-asked the same old question.  Still no luck.

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

×