SoundOverride (class)

From Moondust Wiki
Jump to navigation Jump to 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


* is the id of the sound effect.


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.