@@ -545,6 +545,21 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
545545 lilBf .antialiasing = true ;
546546 add (lilBf );
547547
548+ lilBf2 = new FlxSprite (32 , 332 ).loadGraphic (Paths .image (" editors/lilBf" ), true , 300 , 256 );
549+ lilBf2 .animation .add (" idle" , [0 , 1 ], 12 , true );
550+ lilBf2 .animation .add (" 0" , [3 , 4 , 5 ], 12 , false );
551+ lilBf2 .animation .add (" 1" , [6 , 7 , 8 ], 12 , false );
552+ lilBf2 .animation .add (" 2" , [9 , 10 , 11 ], 12 , false );
553+ lilBf2 .animation .add (" 3" , [12 , 13 , 14 ], 12 , false );
554+ lilBf2 .animation .add (" yeah" , [17 , 20 , 23 ], 12 , false );
555+ lilBf2 .animation .play (" idle" );
556+ lilBf2 .animation .finishCallback = function (name : String ){
557+ lilBf2 .animation .play (name , true , false , lilBf2 .animation .getByName (name ).numFrames - 2 );
558+ }
559+ lilBf2 .scrollFactor .set ();
560+ lilBf2 .antialiasing = true ;
561+ add (lilBf2 );
562+
548563 lilOpp = new FlxSprite (32 , 332 ).loadGraphic (Paths .image (" editors/lilOpp" ), true , 300 , 256 );
549564 lilOpp .animation .add (" idle" , [0 , 1 ], 12 , true );
550565 lilOpp .animation .add (" 0" , [3 , 4 , 5 ], 12 , false );
@@ -559,6 +574,20 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
559574 lilOpp .antialiasing = true ;
560575 add (lilOpp );
561576
577+ lilOpp2 = new FlxSprite (32 , 332 ).loadGraphic (Paths .image (" editors/lilOpp" ), true , 300 , 256 );
578+ lilOpp2 .animation .add (" idle" , [0 , 1 ], 12 , true );
579+ lilOpp2 .animation .add (" 0" , [3 , 4 , 5 ], 12 , false );
580+ lilOpp2 .animation .add (" 1" , [6 , 7 , 8 ], 12 , false );
581+ lilOpp2 .animation .add (" 2" , [9 , 10 , 11 ], 12 , false );
582+ lilOpp2 .animation .add (" 3" , [12 , 13 , 14 ], 12 , false );
583+ lilOpp2 .animation .play (" idle" );
584+ lilOpp2 .animation .finishCallback = function (name : String ){
585+ lilOpp2 .animation .play (name , true , false , lilOpp2 .animation .getByName (name ).numFrames - 2 );
586+ }
587+ lilOpp2 .scrollFactor .set ();
588+ lilOpp2 .antialiasing = true ;
589+ add (lilOpp2 );
590+
562591 // remember to add the new function
563592 createLilGirlfriend ();
564593 createLilPlayer ();
@@ -570,6 +599,8 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
570599 if (chartEditorSave .data .lilBuddiesBox != null ) lilBuddiesOn = chartEditorSave .data .lilBuddiesBox ;
571600 if (chartEditorSave .data .reverseScroll != null ) reverseScrollEnabled = chartEditorSave .data .reverseScroll ;
572601 lilStage .visible = lilBf .visible = lilOpp .visible = lilStage .active = lilBf .active = lilOpp .active = lilBuddiesOn ;
602+ lilBf2 .visible = lilBf2 .active = (lilBuddiesOn && PlayState .SONG .player4 != null );
603+ lilOpp2 .visible = lilOpp2 .active = (lilBuddiesOn && PlayState .SONG .player5 != null );
573604
574605 if (lilBuddiesOn ) {
575606 remove (lilPlayer );
@@ -1296,6 +1327,8 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
12961327
12971328 var lilBfResetAnim : Float = 0 ;
12981329 var lilOppResetAnim : Float = 0 ;
1330+ var lilBf2ResetAnim : Float = 0 ;
1331+ var lilOpp2ResetAnim : Float = 0 ;
12991332
13001333 var lilPlayerDP : Array <Float > = [- 300 , 110 ];
13011334 var lilPlayer2DP : Array <Float > = [- 200 , 150 ];
@@ -1542,6 +1575,15 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
15421575 }
15431576 }
15441577
1578+ if (lilOpp2ResetAnim > 0 ) {
1579+ lilOpp2ResetAnim - = elapsed ;
1580+ if (lilOpp2ResetAnim <= 0 ) {
1581+ lilOpp2 .animation .play (' idle' );
1582+ lilOpp2 .color = FlxColor .WHITE ;
1583+ lilOpp2ResetAnim = 0 ;
1584+ }
1585+ }
1586+
15451587 if (lilBfResetAnim > 0 ) {
15461588 lilBfResetAnim - = elapsed ;
15471589 if (lilBfResetAnim <= 0 ) {
@@ -1551,6 +1593,15 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
15511593 }
15521594 }
15531595
1596+ if (lilBf2ResetAnim > 0 ) {
1597+ lilBf2ResetAnim - = elapsed ;
1598+ if (lilBf2ResetAnim <= 0 ) {
1599+ lilBf2 .animation .play (' idle' );
1600+ lilBf2 .color = FlxColor .WHITE ;
1601+ lilBf2ResetAnim = 0 ;
1602+ }
1603+ }
1604+
15541605 super .update (elapsed );
15551606
15561607 if (songFinished )
@@ -2286,15 +2337,27 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
22862337 if (! note .noAnimation ) {
22872338 if (note .mustPress )
22882339 {
2289- lilBf .animation .play (" " + (note .noteData % Note .ammo [PlayState .mania ]), true );
2290- lilBf .color = note .rgbShader .r ;
2291- lilBfResetAnim = ((Conductor .stepCrochet * PlayState .mania ) + note .sustainLength ) / 1000 / playbackRate ; // for lil buddies to reset after hitting notes. It doesn't stop at sections anymore.
2340+ if (note .exNote ) {
2341+ lilBf2 .animation .play (" " + (note .noteData % Note .ammo [PlayState .mania ]), true );
2342+ lilBf2 .color = note .rgbShader .r ;
2343+ lilBf2ResetAnim = ((Conductor .stepCrochet * PlayState .mania ) + note .sustainLength ) / 1000 / playbackRate ; // for lil buddies to reset after hitting notes. It doesn't stop at sections anymore.
2344+ } else {
2345+ lilBf .animation .play (" " + (note .noteData % Note .ammo [PlayState .mania ]), true );
2346+ lilBf .color = note .rgbShader .r ;
2347+ lilBfResetAnim = ((Conductor .stepCrochet * PlayState .mania ) + note .sustainLength ) / 1000 / playbackRate ; // for lil buddies to reset after hitting notes. It doesn't stop at sections anymore.
2348+ }
22922349 }
22932350 else
22942351 {
2295- lilOpp .animation .play (" " + (note .noteData % Note .ammo [PlayState .mania ]), true );
2296- lilOpp .color = note .rgbShader .r ;
2297- lilOppResetAnim = ((Conductor .stepCrochet * PlayState .mania ) + note .sustainLength ) / 1000 / playbackRate ;
2352+ if (note .exNote ) {
2353+ lilOpp2 .animation .play (" " + (note .noteData % Note .ammo [PlayState .mania ]), true );
2354+ lilOpp2 .color = note .rgbShader .r ;
2355+ lilOpp2ResetAnim = ((Conductor .stepCrochet * PlayState .mania ) + note .sustainLength ) / 1000 / playbackRate ;
2356+ } else {
2357+ lilOpp .animation .play (" " + (note .noteData % Note .ammo [PlayState .mania ]), true );
2358+ lilOpp .color = note .rgbShader .r ;
2359+ lilOppResetAnim = ((Conductor .stepCrochet * PlayState .mania ) + note .sustainLength ) / 1000 / playbackRate ;
2360+ }
22982361 }
22992362 }
23002363 }
@@ -2311,8 +2374,10 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
23112374 function resetBuddies () // lil buddies
23122375 {
23132376 lilBf .animation .play (" idle" );
2377+ lilBf2 .animation .play (" idle" );
23142378 lilOpp .animation .play (" idle" );
2315- lilBf .color = lilOpp .color = FlxColor .WHITE ;
2379+ lilOpp2 .animation .play (" idle" );
2380+ lilBf .color = lilBf2 .color = lilOpp .color = lilOpp2 .color = FlxColor .WHITE ;
23162381 }
23172382
23182383 function moveSelectedNotes (noteData : Int = 0 , lastY : Float ) // This turns selected notes into moving notes
@@ -2788,7 +2853,7 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
27882853 var section = PlayState .SONG .notes [secNum ];
27892854
27902855 var daStrumTime : Float = note [0 ];
2791- var daNoteData : Int = Std . int (note [1 ] % GRID_COLUMNS_PER_PLAYER );
2856+ var daNoteData : Int = (note [1 ]);
27922857 var gottaHitNote : Bool = (note [1 ] < GRID_COLUMNS_PER_PLAYER );
27932858 try {
27942859 var isAlt : Bool = section .altAnim && ! gottaHitNote ;
@@ -5517,6 +5582,8 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
55175582 lilBuddiesOn = ! lilBuddiesOn ;
55185583 chartEditorSave .data .lilBuddiesBox = lilBuddiesOn ;
55195584 lilStage .visible = lilBf .visible = lilOpp .visible = lilStage .active = lilBf .active = lilOpp .active = lilBuddiesOn ;
5585+ lilBf2 .visible = lilBf2 .active = (lilBuddiesOn && PlayState .SONG .player4 != null );
5586+ lilOpp2 .visible = lilOpp2 .active = (lilBuddiesOn && PlayState .SONG .player5 != null );
55205587 lilBuddiesBoxButton .text .text = lilBuddiesOn ? ' Lil Buddies ON' : ' Lil Buddies OFF' ;
55215588 if (! lilBuddiesOn ) reloadLilBuddies ();
55225589 else lilPlayer .visible = lilPlayer2 .visible = lilOpponent .visible = lilOpponent2 .visible = lilGf .visible = false ;
0 commit comments