Sound Related Question (Quick Fix, I believe)

Jak-Skell

New Member
Reaction score
0
Well, in my map, it uses the following trigger.
Trigger:
  • Ironic
    • Events
      • Player - Player 1 (Red) types a chat message containing Ironic as An exact match
    • Conditions
    • Actions
      • Sound - Play Ironic <gen>


Now, I want to make it so that if a player said "-silence", they would not be able to hear these sounds. I thought I could do this with Player Groups, so I have:
Trigger:
  • Silence
    • Events
      • Player - Player 1 (Red) types a chat message containing -silence as An exact match
      • Player - Player 2 (Blue) types a chat message containing -silence as An exact match
      • Player - Player 3 (Teal) types a chat message containing -silence as An exact match
      • Player - Player 4 (Purple) types a chat message containing -silence as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -silence as An exact match
      • Player - Player 6 (Orange) types a chat message containing -silence as An exact match
      • Player - Player 7 (Green) types a chat message containing -silence as An exact match
      • Player - Player 8 (Pink) types a chat message containing -silence as An exact match
      • Player - Player 9 (Gray) types a chat message containing -silence as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -silence as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -silence as An exact match
    • Conditions
    • Actions
      • Player Group - Add (Triggering player) to NoSound


So now I need to make it so only players outside of NoSound can hear these noises, or I can do the reverse and make it so only members of a group called "Sound" or something can hear the noises.

How do I do this?
 

ElderKingpin

Post in the anime section, or die.
Reaction score
133
then turn off ironic for (player)

Trigger:
  • Silence
    • Events
    • Player - Player 1 (Red) types a chat message containing -silence as An exact match
    • Player - Player 2 (Blue) types a chat message containing -silence as An exact match
    • Player - Player 3 (Teal) types a chat message containing -silence as An exact match
    • Player - Player 4 (Purple) types a chat message containing -silence as An exact match
    • Player - Player 5 (Yellow) types a chat message containing -silence as An exact match
    • Player - Player 6 (Orange) types a chat message containing -silence as An exact match
    • Player - Player 7 (Green) types a chat message containing -silence as An exact match
    • Player - Player 8 (Pink) types a chat message containing -silence as An exact match
    • Player - Player 9 (Gray) types a chat message containing -silence as An exact match
    • Player - Player 10 (Light Blue) types a chat message containing -silence as An exact match
    • Player - Player 11 (Dark Green) types a chat message containing -silence as An exact match
    • Conditions
    • Actions
    • Player Group - Turn off Ironic for (Triggering Player)
 

ElderKingpin

Post in the anime section, or die.
Reaction score
133
it should just be a turn off sound trigger (sorry, dont have WE on this comp :X)

Plus, i think all of the players can be grouped in a group like (All players)
 

Jak-Skell

New Member
Reaction score
0
it should just be a turn off sound trigger (sorry, dont have WE on this comp :X)

Plus, i think all of the players can be grouped in a group like (All players)

I mean, what category.

Sound, Player, Floating Text, Game Cache, Etx.
 

Jak-Skell

New Member
Reaction score
0
Update: So I found this same trigger but in JASS.

JASS:
function Trig_Silence_Actions takes nothing returns nothing
local string s=GetEventPlayerChatString()
local player p=GetTriggerPlayer()
if s=="-silence" then
call DisplayTextToPlayer(p,0,0,"|cff0080ffPlayer-produced sounds |r|cffff0000OFF|r")
call ForceAddPlayer(udg_SilenceGroup,p)
elseif s=="-unsilence" then
call DisplayTextToPlayer(p,0,0,"|cff0080ffPlayer-produced sounds |r|cff00ff00ON|r")
call ForceRemovePlayer(udg_SilenceGroup,p)
endif
set s=""
set p=null
endfunction

//===========================================================================
function InitTrig_Silence takes nothing returns nothing
local integer i=0
    set gg_trg_Silence = CreateTrigger(  )
loop
exitwhen i>11
    call TriggerRegisterPlayerChatEvent( gg_trg_Silence, Player(i), "-silence", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Silence, Player(i), "-unsilence", true )
set i=i+1
endloop
    call TriggerAddAction( gg_trg_Silence, function Trig_Silence_Actions )
endfunction


If that helps.

Now, can I turn off a certain channel, and produce sound only on this channel?

EDIT: Remember, the -silence command should only turn off sound for one player!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top