# Set Sound Channel Volume

Grammar — Set channel channel volume to volume% over duration seconds for players
FlagsNative | Action

Sets a specified sound channel to a volume for the specified player group.

# Arguments

  • playergroup — Players
  • int [ preset::SoundChannel ] — Channel
  • fixed — Volume
  • fixed — Duration

Returns — void

native void SoundChannelSetVolume(
	playergroup players,
	int channel,
	fixed volume,
	fixed duration,
);

Category: Sound / Sound Channels

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L8642
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 0.0, 0.0)
// L5013
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryVoice, 100.0, 0.0)
// L5014
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDialogue, 100.0, 0.0)
// L2643
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 30.0, 0.5)
// L2644
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryVoice, 100.0, 0.5)
// L2667
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryAlert, 0.0, lp_duration)
// L2668
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryAmbient, 0.0, lp_duration)
// L2669
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryBuild, 0.0, lp_duration)
// L2670
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 0.0, lp_duration)
// L2671
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDeath, 0.0, lp_duration)
// L2672
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDialogue, 0.0, lp_duration)
// L2673
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 0.0, lp_duration)
// L2674
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryFlames, 0.0, lp_duration)
// L5303
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDialogue, 100.0, 0.0)
// L5304
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryVoice, 100.0, 0.0)
// L5553
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 0.0)
// L5667
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 0.0)
// L5668
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDeath, 50.0, 0.0)
// L2277
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 10.0, 0.0)
// L2281
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 100.0, 0.0)
// L3914
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 10.0, 0.0)
// L3918
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 100.0, 0.0)
// L8642
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 0.0, 0.0)
// L5013
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryVoice, 100.0, 0.0)
// L5014
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDialogue, 100.0, 0.0)
// L2643
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 30.0, 0.5)
// L2644
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryVoice, 100.0, 0.5)
// L2667
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryAlert, 0.0, lp_duration)
// L2668
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryAmbient, 0.0, lp_duration)
// L2669
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryBuild, 0.0, lp_duration)
// L2670
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 0.0, lp_duration)
// L2671
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDeath, 0.0, lp_duration)
// L2672
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDialogue, 0.0, lp_duration)
// L2673
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 0.0, lp_duration)
// L2674
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryFlames, 0.0, lp_duration)
// L5303
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDialogue, 100.0, 0.0)
// L5304
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryVoice, 100.0, 0.0)
// L5553
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 0.0)
// L5667
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 0.0)
// L5668
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDeath, 50.0, 0.0)
// L2277
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 10.0, 0.0)
// L2281
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 100.0, 0.0)
// L3914
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 10.0, 0.0)
// L3918
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 100.0, 0.0)

# campaigns/libertystory.sc2campaign

CampaignLib.galaxy

// L836
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryVoice, 100.0, 0.5)
// L840
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryVoice, 0.0, 0.25)

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L5775
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 12.0, 1.0)
// L5776
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDeath, 12.0, 1.0)
// L5799
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 100.0, 1.0)
// L5800
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDeath, 100.0, 1.0)
// L6468
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryTV, 50.0, 1.0)
// L2101
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 12.5, 1.0)
// L8821
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryOther, 25.0, 0.1)
// L8822
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 25.0, 0.1)
// L8850
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryOther, 100.0, 1.0)
// L9192
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 70.0, 2.0)
// L9200
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 2.0)
// L9228
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryOther, 15.0, 4.5)
// L9241
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryOther, 100.0, 3.0)
// L9675
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryOther, 50.0, 1.0)
// L9677
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryOther, 100.0, 2.0)
// L5591
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 0.1)
// L5604
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 0.1)
// L5177
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 0.1)
// L5191
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDeath, 20.0, 0.5)
// L5192
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 20.0, 0.5)
// L5193
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 0.1)
// L843
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 20.0, 0.0)
// L846
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 100.0, 0.0)
// L5512
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 80.0, 0.1)
// L5997
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 0.1)
// L2444
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMovement, 75.0, 0.5)
// L2445
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 75.0, 1.0)
// L2446
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 85.0, 1.0)
// L2455
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryUI, 100.0, 0.0)
// L7465
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 85.0, 1.0)
// L5116
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 75.0, 1.0)
// L5125
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 40.0, 1.0)
// L5142
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 1.0)
// L5197
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 1.0)
// L5201
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 1.0)
// L5370
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 1.0)
// L5373
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 1.0)
// L8702
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 1.0)
// L9065
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 1.0)
// L9527
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryMusic, 100.0, 1.0)
// L6503
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryME, 45.0, 1.5)
// L6507
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryME, 70.0, 5.0)
// L7636
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 100.0, 0.1)
// L2777
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 25.0, 0.1)
// L2778
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategorySpell, 20.0, 0.1)
// L3084
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 25.0, 0.1)
// L3085
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategorySpell, 20.0, 0.1)
// L3259
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 25.0, 0.1)
// L3260
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategorySpell, 20.0, 0.1)
// L3434
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 25.0, 0.1)
// L3435
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategorySpell, 20.0, 0.1)
// L3788
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryCombat, 25.0, 0.1)
// L3789
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategorySpell, 20.0, 0.1)
// L4673
SoundChannelSetVolume(PlayerGroupAll(), c_soundCategoryDoodad, 0.0, 0.1)