SoundOverride (class)

From PGE Wiki
Jump to: navigation, search

This class represents an sound effects that can be replaced or muted. This is a "virtual" class which is created for every SMBX sound.

You can access this class with
Audio.sounds[*]

* is the id of the sound effect.


Example:

Audio.sounds[1].sfx = myNewSound

This example would replace sound effect 1 with myNewSound.

To reset it back to default you can do:

Audio.sounds[1].sfx = nil

Further fields and functions are listed here:

SoundOverride class
Type Function/Field Return values/Value type Description
Field SoundOverride.sfx Mix_Chunk The current sound effect audio.
Field SoundOverride.muted boolean Whether the sound effect is muted.