I need help with some freeplay stuff, since in the freeplay state u cant just search for a song and code some extra shit in there you gotta improvise
I wanna make a feature for when you select a song you see a sprite that previews the character your gonna go against, can anyone help with this?
just make all the sprites in create and make them all invisible, and then use if statements (or a switch statement) in update to check what song you have selected, and then make the proper sprite visible again (don't forget to set the other ones invisible again)
that would look something like this:
switch(songs[curSelected].songName) { case 'song1': sprite1.visible = true; sprite2.visible = false;
sprite3.visible = false; case 'song2': sprite1.visible = false; sprite2.visible = true;
sprite3.visible = false;
case 'song3': sprite1.visible = false; sprite2.visible = false;
sprite3.visible = true;
}
or what you could do is use a character (not FlxSprite) and then just make a function to change the character to something else (you can just copy that shit from the change character event in playstate) and then using the same if/switch statement you just run the function
I'd recommend putting this right before super.update(elapsed); so that it detects songs[curSelected].songName properly
(doesn't have to be specifically before super.update(elapsed), just put it somewhere near the end of the update function)