| author | hifish |
|---|---|
| desc | This page has small general tips and tricks. |
| lastUpdated | 2025-01-11 23:44:26 UTC |
| title | Tips & Tricks |
You may have a sprite that you might wanna put above or below another sprite. This is possible using the insert(position:Int, object:T) function.
var blueSolid = new FunkinSprite(200, 200).makeSolid(200, 200, FlxColor.RED);
add(blueSolid);
var redSolid = new FunkinSprite(250, 250).makeSolid(100, 100, FlxColor.RED);
insert(members.indexOf(blueSolid)+1, redSolid);
/*
This would add the red solid right above the blue solid. If we want it below the blue
solid, we would use the insert function, like so.
*/
insert(members.indexOf(blueSolid), redSolid);
Instead of the window name being "Friday Night Funkin' - Codename Engine", you can change it to be whatever you want.
Start by editing or making a script named global in your mod/data.
Now, you can add these lines.
import funkin.backend.utils.WindowUtils; //Put this at the top of the file.
WindowUtils.winTitle = 'Your Mod Name';
/*
This line could either be added outside of a function, or you could put it in
function new()
*/Using this over window.title is much better, since it won't reset on state changes.
It's literally just one line.
graphicCache.cache(Paths.image('your image'));If you want to add this mod switch menu to your custom mod state, it is relatively simple.
import funkin.menus.ModSwitchMenu; //Import the menu.
if (controls.SWITCHMOD) //Or any sort of event you want this to happen
{
openSubState(new ModSwitchMenu());
persistentUpdate = false;
persistentDraw = true;
}
//You can also do the same thing with the editor picker.
import funkin.editors.EditorPicker;
if (FlxG.keys.justPressed.SEVEN) //Or any sort of event you want this to happen
{
openSubState(new EditorPicker());
persistentUpdate = false;
persistentDraw = true;
}
You may want an audio file to have a BPM assigned to it, like the menu music.
To do this, navigate to the folder that has the audio you want to assign a BPM to (ex: freakyMenu.ogg).

Now, create an .ini file with the same name as the audio file you want to assign a BPM to, and open the file and add BPM=your bpm value.

Please note that you must use CoolUtil.playMusic() for the .ini file to have any effect.
