Player Silencer
Last updated
Last updated
The silencer is used to mute/unmute player's microphones, mainly for moderation purposes
To be able to use the Silencer the user need to have the PDA_Item_Silencer_PlayerSelector in the inventory and equip it. Once the item is selected the Silencer UI will appear in the bottom left corner. While active you will be able to select as many people as necessary and mute them. There are multiple selection options that come from the PlayerSelector Device, like Direct or Brush selection under Manual Selection. A "Select by Tag" and "Select by Role" are on the works.
To mute the selected users use the buttons on the UI or use the shortcuts indicated on the left of the corresponding button. The muted user will be notified in multiple ways. A "You are muted" message will appear on top of the microphone icon on the bottom right corner. Also, a message popup will appear for a couple of seconds notifying that you have been muted and the user that muted you. In a future we will have a "Reason" section to explain the mute action.
As long as the item is active, the user with the Silencer will be able to see who is muted on the session indicated by a Muted red icon on top of the user nametag.
There are multiple sections of this system that can be customized
The Muting happens under BP_SilencerAbility_PlayerSelector. The default behavior is to join the players selected with the Manual Selection with the users that will fall under one of the Tags or Roles selected, adding all the users under one big list and applying the action to all of them. Any change to the selection should be here and call SetCharacterMuted with the final list. Note that the players that have the "VoiceAuthority" Capability won't be muted.
The message displaying "You have been muted by User_X" is displayed using the BPC_GlobalMessageReceiver and is called from BPMC_CrowdAudio -> OnRep_ManuallyMuted. Any modification to the message can be added there using the S_TemporaryMessageRow array. The duration for the Popup can be changed on the SendMessageRows call.
The Muted icon that appears on top of the player nameplate corresponds to the WBP_Muted. This widget contains the logic that allows it to only be visible if you have the Silencer active and the player you see is muted. Any change to the design or visibility functionality should be contained in this widget.
The "You are muted" message corresponds to the WBP_ManuallyMutedNotice. Similar to the Muted Icon this widget contains the logic to only be visible if you are muted. The message displayed is a simple text widget.
To be able to test locally the Silencer there are a couple of steps to follow. Use THIS guide to create multiple accounts to be able to test it locally using the Unreal Editor.
Once you have multiple users on the same session working you need to equip the Silencer Item. Check if your role have the Silencer Item assigned or use "juno.inventory.additems PDA_Item_Silencer_PlayerSelector" to add it through commands. Press the corresponding key of your hotbar to activate the Silencer.