-
|
I just need to know how to access separate characters' notes because I need them to tween to the middle of the screen for middlescroll and other positions as well, preferably using the 0.50 value as the chart editor does. I would also like to be able to set the alpha of the opponent notes and healthbar to 0 with a tween out without affecting player notes. It's probably something really simple if it's possible. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you're looking for complex note movements, for example how the notes move in Vs. Hex's "Detected," you may be interested in FunkinModchart. FunkinModchart is integrated into the engine by default and will work out of the box on stable versions.
In the case of the opponent notes, if you want to hide them for the entire song, there's a button under each strumline's settings that will allow you to set the visibility of the strumlines from the start of the song. If you wish to tween both the health bar and the opponent's notes at the same time, the following snippet will do: for (i in [healthBar, healthBarBG].concat(cpu.members))
FlxTween.tween(i, {alpha: 0}, 1);However, this isn't the only step for tweening opponent notes in particular; you also will usually have to account for every visible note as well, though this will depend on whether or not there will be notes on the strumline during the period of time the strumline is invisible. If there will be notes on the strumline, one solution to update the alpha value of the notes at the same time as the strums, is to define a boolean variable to track that the strums are fading out or are already invisible. Then, every time var areNotesInvisible:Bool = false;
// . . .
areNotesInvisible = true;
// The above line would go alongside the for loop snippet above.
// . . .
function postUpdate()
if (areNotesInvisible)
cpu.notes.forEach((note) -> note.alpha = cpu.members[0].alpha); |
Beta Was this translation helpful? Give feedback.
If you're looking for complex note movements, for example how the notes move in Vs. Hex's "Detected," you may be interested in FunkinModchart. FunkinModchart is integrated into the engine by default and will work out of the box on stable versions.
In the case of the opponent note…