Skip to content

Commit 2c908dd

Browse files
add gfComboAnim to goodNoteHit (#1115)
* add gfComboAnim to goodNoteHit * not really a gf combo if *anyone* can do it, is it * add some examples (for some reason the other commit didn't go thru)
1 parent 5f7c45c commit 2c908dd

7 files changed

Lines changed: 25 additions & 11 deletions

File tree

assets/data/characters/gf-car.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE codename-engine-character>
22
<character isPlayer="false" flipX="false" x="75" y="335" centercam="false" icon="gf" color="#A5004D">
3-
<anim name="danceLeft" anim="GF Dancing Beat Hair blowing CAR" fps="24" loop="false" x="0" y="0" indices="0..15" />
4-
<anim name="danceRight" anim="GF Dancing Beat Hair blowing CAR" fps="24" loop="false" x="0" y="0" indices="16..30" />
3+
<anim name="danceLeft" anim="GF Dancing Beat Hair blowing CAR" indices="0..15" />
4+
<anim name="danceRight" anim="GF Dancing Beat Hair blowing CAR" indices="16..30" />
55
</character>
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<!DOCTYPE codename-engine-character>
22
<character x="115" y="325" sprite="gf-christmas" icon="gf" centercam="false" color="#A5004D">
3-
<anim name="danceLeft" anim="GF Dancing Beat" x="0" y="-9" fps="24" loop="false" indices="0..14"/>
4-
<anim name="danceRight" anim="GF Dancing Beat" x="0" y="-9" fps="24" loop="false" indices="15..30"/>
5-
<anim name="cheer" anim="GF Cheer" x="0" y="-9" fps="24" loop="false"/>
6-
<anim name="sad" anim="gf sad" x="-51" y="306" fps="24" loop="true" indices="0..12"/>
3+
<anim name="danceLeft" anim="GF Dancing Beat" y="-9" indices="0..14"/>
4+
<anim name="danceRight" anim="GF Dancing Beat" y="-9" indices="15..30"/>
5+
<anim name="cheer" anim="GF Cheer" y="-9"/>
6+
<anim name="sad" anim="gf sad" x="-51" y="306" loop="true" indices="0..12"/>
7+
<anim name="combo50" anim="GF Cheer" y="-9"/>
78
</character>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE codename-engine-character>
22
<character x="180" y="300" sprite="gf-pixel" scale="6" antialiasing="false" camx="180" camy="300" icon="gf-pixel" color="#C70660">
3-
<anim name="danceLeft" anim="GF IDLE" x="0" y="0" fps="24" loop="false" indices="0..14"/>
4-
<anim name="danceRight" anim="GF IDLE" x="0" y="0" fps="24" loop="false" indices="15..30"/>
3+
<anim name="danceLeft" anim="GF IDLE" indices="0..14"/>
4+
<anim name="danceRight" anim="GF IDLE" indices="15..30"/>
55
</character>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE codename-engine-character>
22
<character sprite="gf-tankmen" icon="gf" centercam="false" color="#A5004D">
3-
<anim name="danceLeft" anim="GF Dancing at Gunpoint" x="0" y="0" fps="24" loop="false" indices="0..14"/>
4-
<anim name="danceRight" anim="GF Dancing at Gunpoint" x="0" y="0" fps="24" loop="false" indices="15..30"/>
5-
<anim name="dance-cutscene" anim="GF Dancing at Gunpoint" x="0" y="0" fps="24" loop="true"/>
3+
<anim name="danceLeft" anim="GF Dancing at Gunpoint" indices="0..14"/>
4+
<anim name="danceRight" anim="GF Dancing at Gunpoint" indices="15..30"/>
5+
<anim name="dance-cutscene" anim="GF Dancing at Gunpoint" loop="true"/>
66
<anim name="sad" anim="GF Crying at Gunpoint" x="-315" y="6" fps="24" loop="true" indices="0..12"/>
77
</character>

assets/data/characters/gf.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
<anim name="hairFall" anim="GF Dancing Beat Hair Landing" indices="0..11"/>
1212
<anim name="scared" anim="GF FEAR " loop="true"/>
1313
<anim name="sad" anim="gf sad" x="-51" y="315" loop="true" indices="0..12"/>
14+
<anim name="combo50" anim="GF Cheer"/>
1415
</character>

source/funkin/backend/scripting/events/note/NoteHitEvent.hx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ final class NoteHitEvent extends CancellableEvent {
3939
* Whenever the Combo sprite should be shown or not (like old Week 7 patches).
4040
*/
4141
public var displayCombo:Null<Bool>;
42+
/**
43+
* Whenever anybody with a combo anim for your combo ought to play it (think GF's "combo50" anim).
44+
*/
45+
public var charsComboAnim:Null<Bool>;
4246
/**
4347
* Note that has been pressed
4448
*/

source/funkin/game/PlayState.hx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,6 +2024,14 @@ class PlayState extends MusicBeatState
20242024
} else if (event.countAsCombo)
20252025
combo++;
20262026

2027+
if (event.charsComboAnim && event.player && combo > 0) {
2028+
var comboAnim:String = 'combo$combo';
2029+
2030+
for (sl in strumLines.members) for (c in sl.characters) {
2031+
if (c.hasAnim(comboAnim)) c.playAnim(comboAnim, true);
2032+
}
2033+
}
2034+
20272035
if (event.showRating || (event.showRating == null && event.player))
20282036
{
20292037
displayCombo(event);

0 commit comments

Comments
 (0)