Codename Logo Codename Logo

Script Snippets

APIWiki

Useful script snippets for modders

Some features don't exist in our engine, luckily, we can script them in!

Song Scripts

idk bro

Global Scripts

Replace pre-existing states with custom states.

var redirectStates:Map<FlxState, String> = [
    TitleState => "CustomTitleState"
];

function preStateSwitch() {
    for (redirectState in redirectStates.keys())
        if (Std.isOfType(FlxG.game._requestedState, redirectState))
            FlxG.game._requestedState = new ModState(redirectStates.get(redirectState));
}

to be filled with other snippets

Last updated: 2024-09-02