top of page

Power On Cue Sound

This guide will show you how to have a sound play for all players when the Power turns on.

 

SCRIPT


Open your mapname.gsc located in "Call of Duty Black Ops III\usermaps\zm_mapname\scripts\zm" and find the following line:

#using scripts\zm\zm_usermap;

Paste in the following underneath that (any define should be underneath all of your usings for organization's sake):

#define POWER_CUE_SOUND ""

Next, find the following line within your function main() :

zm_usermap::main();

Paste in the following underneath that, still within function main() :

level thread power_sound();

At the bottom of your mapname.gsc, paste in the following:

function power_sound()
{
    level waittill("power_on");
    
    foreach(player in GetPlayers())
    {
        player PlayLocalSound( POWER_CUE_SOUND );
    }
}

 

SOUNDS


Go back to the define we pasted in before:

#define POWER_CUE_SOUND ""


Within these quotation marks you may add your own sounds that are setup properly within an alias. If you don't know how to do that, follow the guide HERE.


For an example of a properly setup "Power Cue Sound", here is mine:

power_cue_sound,,,filepath\sound.wav,,,UIN_MOD,,,,,BUS_FX,grp_music,snp_never_duck,cmn_duck_music,0,0,84,84,0,10000,10000,allon,default,allon,default,8,priority,8,oldest,0,0,100,100,0,1,no,2d,music_all,,nonlooping,,1,0,0,0,0,0.25,no,yes,,0,,no,water,over,,,,,,,no,yes,no,0,0,yes,no,,,,,no,no,no,yes,,,,,,,,,,,,,800,3000,,no,no,no,no,no,no,no,,,

Using the provided example, our define should now look like this:

#define POWER_CUE_SOUND "power_cue_sound"

That's it! Make sure to Link your map!


Related Posts

See All

Fix "missing 'iwmap' version specification" Error

This error appears when trying to Compile your map and will entirely fail and stop the compiler. To fix this, all you must do is find the missing prefab and remove it from your map. In my case, this w

Multiple Power Switches

This guide will show you how to implement multiple power switches, such as in Shangri-La, where there are two power switches that must be both flipped in order to turn on the power. This will not cove

bottom of page