Macros
Last updated
Was this helpful?
Last updated
Was this helpful?
A macro acts as shorthand for longer inputs. You could for example shorten a command with multiple parameters, into a concise macro that is faster to write.
Create a macro with the macro.add
command, followed by the input you want to substitute.
Typing macro.add loadmain 'scene.load MainScene'
results in a macro called #loadmain.
When the input gets processed, #loadmain will automatically be replaced with scene.load MainScene
.
For an overview of all macros currently registered, simply execute the macro.getall
command.
To remove a macro, type macro.remove
followed by the name of the macro, excluding the #.
macro.remove loadmain
You can also remove all registered macros with macro.removeall