DX MODDING GUIDE
  • Welcome to the DX Modding Guide!
  • File Structure
    • Folder Structure
    • Mod File
    • Metadata
  • Lua API
    • Working with GML
    • Callbacks
    • Assets
      • Sprites
      • Sounds
      • Fonts
    • Properties
    • Modcharts
    • FNFFD Functions
  • basic tutorials
    • Custom Songs
    • Example Mods
Powered by GitBook
On this page
  • addSound(name: String, path: String)
  • getSound(name: String)
  1. Lua API
  2. Assets

Sounds

addSound(name: String, path: String)

adds a custom sound for use in scripts path will start from mod folder MUST be an ogg file!!

EXAMPLE:

function onCreatePost()
    addSound("doodledip","assets/doodledip.ogg") -- doodledip! :]
end

getSound(name: String)

gets a sound you added

EXAMPLE:

function onPlayerNote()
    audio_play_sound(getSound("doodledip"),0,false) -- bootleg hitsounds
end
PreviousSpritesNextFonts

Last updated 9 months ago