Forever-Engine-Legacy
Forever-Engine-Legacy copied to clipboard
How to add tricky like arrows?
There aren't many forever engine games or tutorials with how to make tricky arrows and I wonder how you make them.
look for a kade tutorial, it most likely uses the same principles
look for a kade tutorial, it most likely uses the same principles
ok I will
go to the ChartLoader.hx
file and search for this
var daNoteAlt:Float = 0;
below that variable, create a new one
var daNoteType:Int = 0;
replace
if (songNotes.length > 2) {
daNoteAlt = songNotes[3];
}
with
if (songNotes.length > 2) {
//daNoteAlt = songNotes[3];
daNoteType = songNotes[3];
}
search for var swagNote:Note = ForeverAssets.generateArrow(PlayState.assetModifier, daStrumTime, daNoteData, daNoteAlt);
before daNoteAlt
, add daNoteType,
search for oldNote = unspawnNotes[Std.int(unspawnNotes.length - 1)];
replace the variable right below it with
var sustainNote:Note = ForeverAssets.generateArrow(PlayState.assetModifier, daStrumTime + (Conductor.stepCrochet * susNote) + Conductor.stepCrochet, daNoteData, daNoteType, daNoteAlt, true, oldNote);
now go to Note.hx
, scroll down to default: // base game arrows for no reason whatsoever
replace the newNote.frames
statement with this
var whatItNeeds:String = 'NOTE_assets';
switch (noteType) {
case 1:
whatItNeeds = 'noteFileName';
default:
// just to be sure;
whatItNeeds = 'NOTE_assets';
}
newNote.frames = Paths.getSparrowAtlas(ForeverTools.returnSkinAsset(whatItNeeds, assetModifier, Init.trueSettings.get("Note Skin"),
'noteskins/notes'));
you can create more cases to fulfil your own needs, you can also do the same thing for quant notes, it also works for them
now go to OriginalChartingState.hx
search for private function addNote
and right after var noteSus = 0;
add this
if (FlxG.keys.pressed.ONE) {
// hurt
noteType = 1;
}
by holding 1 on the chart editor, you can place your custom note
now your notetype is in the game, you can chart it, and it works in game, now just go to PlayState.hx
and add in the function it needs to perform
File Locations are:
source/meta/data/ChartLoader.hx
source/gameObjects/userInterface/notes/Note.hx
source/meta/state/charting/OriginalChartingState.hx
happy coding and have fun!