<aside> ⚡ script "map_bouncesound" (int sound, int force)

</aside>

Event


By default, this script is called by a player who stepped on a vertical bounce pad. If a map has overridden the [map_bouncepad_vertical](<https://mm8bdm.notion.site/map_bouncepad_vertical-e22222c8e7544a1199d2bc057b73688a>) script, this script may not be called by those respective bounce pads.

Usage


This script can replaced by adding a new script in your map of the name, map_bouncesound, to add additional behavior to this event, or override the existing behavior.

This script has no expected return value.

Parameters

Default Script


The default bounce pad sound script plays one of three sound effects, depending on the input of sound, inherited from the bounce pad actor:

// You can override this scripts to play a custom sound for bounce pads.
// Simply remove the "sound" condition and change the array out for a 
// sound defined in SNDINFO
// Activator: Player who bounced
//
str padSounds[3] = {
    "misc/boing",
    "misc/jumppad",
    "misc/pumpjet",
};

script "map_bouncesound" (int sound, int force)
{
    if(sound > -1) {
        ThingSound(ActivatorTID(), padSounds[sound], 128);
    }
}

Example Replacement