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
  1. Lua API

Working with GML

FNFFD is made with gamemaker! this means that (mostly) everything from gml is accessible from lua. this is VERY important for making mods!! its very useful to get used to gml first before using modding with dx its a good idea to have experience with fnffd's source code or atleast have a reference to it while you make scripts! if you’re more used to GML, or need to use it instead of lua for a specific scenario, like psych engine’s runHaxeCode you can use loadGML to run gml code in your lua scripts! this can come with a slight performance cost though, so use with caution!

loadGML(code: String)

runs GML code through a string! (self explanatory) EXAMPLE:

function onCreatePost()
     loadGML([[
          show_message(“hello from gml”)
     ]])
     show_message(“hello from lua”)
end

you can also access an object's variables directly from lua

function onCreatePost()
    obj_player.image_xscale = 2 -- make dude wide
end
PreviousMetadataNextCallbacks

Last updated 8 months ago