Skip to content

[ENHANCEMENT] Set Character Event #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions preload/scripts/characters/bf-christmas.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import funkin.graphics.adobeanimate.FlxAtlasSprite;
import flixel.FlxG;
import funkin.audio.FunkinSound;
import funkin.play.character.MultiSparrowCharacter;
import funkin.play.character.CharacterType;
import funkin.play.GameOverSubState;

class BoyfriendChristmasCharacter extends MultiSparrowCharacter {
Expand All @@ -17,7 +16,7 @@ function onNoteHit(event:HitNoteScriptEvent)
return;
}

if (event.note.noteData.getMustHitNote() && characterType == CharacterType.BF) {
if (event.note.noteData.getMustHitNote() && characterType == 'bf') {
// Override the hit note animation.
switch(event.note.kind) {
case "censor":
Expand Down
1 change: 0 additions & 1 deletion preload/scripts/characters/bf-dark.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import funkin.play.character.SparrowCharacter;
import funkin.play.GameOverSubState;
import funkin.play.character.BaseCharacter;
import funkin.play.character.CharacterDataParser;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;
import funkin.play.character.MultiSparrowCharacter;

Expand Down
5 changes: 2 additions & 3 deletions preload/scripts/characters/darnell.hxc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import funkin.play.character.SparrowCharacter;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;
import funkin.audio.FunkinSound;
import funkin.Conductor;
Expand All @@ -12,7 +11,7 @@ class DarnellCharacter extends SparrowCharacter {

function onNoteHit(event:HitNoteScriptEvent)
{
if (!event.note.noteData.getMustHitNote() && characterType == CharacterType.DAD) {
if (!event.note.noteData.getMustHitNote() && characterType == 'dad') {
// Override the hit note animation.
switch(event.note.kind) {
case "weekend-1-lightcan":
Expand All @@ -31,7 +30,7 @@ class DarnellCharacter extends SparrowCharacter {
}

function onNoteIncoming(event:NoteScriptEvent) {
if (!event.note.noteData.getMustHitNote() && characterType == CharacterType.DAD) {
if (!event.note.noteData.getMustHitNote() && characterType == 'dad') {
// Get how long until it's time to strum the note.
var msTilStrum = event.note.strumTime - Conductor.instance.songPosition;

Expand Down
1 change: 0 additions & 1 deletion preload/scripts/characters/gf-dark.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import funkin.play.character.SparrowCharacter;
import funkin.play.GameOverSubState;
import funkin.play.character.BaseCharacter;
import funkin.play.character.CharacterDataParser;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;

class GirlfriendDarkCharacter extends SparrowCharacter {
Expand Down
5 changes: 2 additions & 3 deletions preload/scripts/characters/gf.hxc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import funkin.play.character.SparrowCharacter;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;
import flixel.addons.effects.FlxTrail;

Expand All @@ -9,7 +8,7 @@ class GirlfriendCharacter extends SparrowCharacter {
}

override function onAdd() {
if (!debug && this.characterType == CharacterType.DAD) {
if (!debug && this.characterType == 'dad') {
// If Girlfriend is the opponent, set her position to the stage's assigned Girlfriend position,
// while maintaining her status as an opponent. This allows the Girlfriend character to use a shared
// character file without weird offsets.
Expand All @@ -32,4 +31,4 @@ class GirlfriendCharacter extends SparrowCharacter {

super.dance(force);
}
}
}
1 change: 0 additions & 1 deletion preload/scripts/characters/nene-dark.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import funkin.graphics.adobeanimate.FlxAtlasSprite;
import funkin.audio.visualize.ABotVis;
import funkin.play.character.BaseCharacter;
import funkin.play.character.CharacterDataParser;
import funkin.play.character.CharacterType;
import funkin.graphics.shaders.TextureSwap;
import openfl.display.BitmapData;
import funkin.util.FlxColorUtil;
Expand Down
1 change: 0 additions & 1 deletion preload/scripts/characters/otis-speaker.hxc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

import funkin.play.character.SparrowCharacter;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;
import flixel.FlxG;
import flixel.FlxSprite;
Expand Down
3 changes: 1 addition & 2 deletions preload/scripts/characters/parents-christmas.hxc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import funkin.play.character.SparrowCharacter;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;

class ParentsChristmasCharacter extends SparrowCharacter {
Expand All @@ -9,7 +8,7 @@ class ParentsChristmasCharacter extends SparrowCharacter {

function onNoteHit(event:HitNoteScriptEvent)
{
if (!event.note.noteData.getMustHitNote() && characterType == CharacterType.DAD) {
if (!event.note.noteData.getMustHitNote() && characterType == 'dad') {
// Override the hit note animation.
switch(event.note.kind) {
case "mom":
Expand Down
1 change: 0 additions & 1 deletion preload/scripts/characters/pico-christmas.hxc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import funkin.play.character.MultiSparrowCharacter;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;
import funkin.play.GameOverSubState;
import funkin.graphics.adobeanimate.FlxAtlasSprite;
Expand Down
3 changes: 1 addition & 2 deletions preload/scripts/characters/pico-dark.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import funkin.play.character.SparrowCharacter;
import funkin.play.GameOverSubState;
import funkin.play.character.BaseCharacter;
import funkin.play.character.CharacterDataParser;
import funkin.play.character.CharacterType;
import funkin.graphics.FunkinSprite;
import funkin.play.PauseSubState;
import funkin.play.PlayState;
Expand All @@ -32,7 +31,7 @@ class PicoDarkCharacter extends MultiSparrowCharacter {
{
super.onNoteHit(event);

if (!event.note.noteData.getMustHitNote() && characterType == CharacterType.BF) {
if (!event.note.noteData.getMustHitNote() && characterType == 'bf') {
// Override the hit note animation.
switch(event.note.kind) {
case "cheer":
Expand Down
1 change: 0 additions & 1 deletion preload/scripts/characters/pico-holding-nene.hxc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import funkin.play.character.SparrowCharacter;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;
import funkin.play.GameOverSubState;
import funkin.graphics.adobeanimate.FlxAtlasSprite;
Expand Down
3 changes: 1 addition & 2 deletions preload/scripts/characters/pico-playable.hxc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import funkin.play.character.MultiSparrowCharacter;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;
import funkin.play.GameOverSubState;
import funkin.graphics.adobeanimate.FlxAtlasSprite;
Expand Down Expand Up @@ -80,7 +79,7 @@ class PicoPlayerCharacter extends MultiSparrowCharacter {
return;
}

if (event.note.noteData.getMustHitNote() && characterType == CharacterType.BF) {
if (event.note.noteData.getMustHitNote() && characterType == 'bf') {
// Override the hit note animation.
switch(event.note.kind) {
case "censor":
Expand Down
1 change: 0 additions & 1 deletion preload/scripts/characters/pico-speaker.hxc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

import funkin.play.character.SparrowCharacter;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;
import flixel.FlxG;
import flixel.FlxSprite;
Expand Down
3 changes: 1 addition & 2 deletions preload/scripts/characters/spooky-dark.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import funkin.play.character.SparrowCharacter;
import funkin.play.GameOverSubState;
import funkin.play.character.BaseCharacter;
import funkin.play.character.CharacterDataParser;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;

class SpookyDarkCharacter extends SparrowCharacter {
Expand All @@ -31,7 +30,7 @@ class SpookyDarkCharacter extends SparrowCharacter {
{
super.onNoteHit(event);

if (!event.note.noteData.getMustHitNote() && characterType == CharacterType.DAD) {
if (!event.note.noteData.getMustHitNote() && characterType == 'dad') {
// Override the hit note animation.
switch(event.note.kind) {
case "cheer":
Expand Down
3 changes: 1 addition & 2 deletions preload/scripts/characters/tankman-atlas.hxc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import funkin.play.character.AnimateAtlasCharacter;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;

/**
Expand All @@ -12,7 +11,7 @@ class TankmanAtlasCharacter extends AnimateAtlasCharacter {

function onNoteHit(event:HitNoteScriptEvent)
{
if (!event.note.noteData.getMustHitNote() && characterType == CharacterType.DAD) {
if (!event.note.noteData.getMustHitNote() && characterType == 'dad') {
// Override the hit note animation.
switch(event.note.kind) {
case "ugh":
Expand Down
3 changes: 1 addition & 2 deletions preload/scripts/characters/tankman-bloody.hxc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import funkin.play.character.MultiSparrowCharacter;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;
import flixel.FlxG;

Expand Down Expand Up @@ -30,7 +29,7 @@ class TankmanBloodyCharacter extends MultiSparrowCharacter {
{
super.onNoteHit(event);

if (!event.note.noteData.getMustHitNote() && characterType == CharacterType.DAD) {
if (!event.note.noteData.getMustHitNote() && characterType == 'dad') {
// Override the hit note animation.
switch(event.note.kind) {
case "ugh":
Expand Down
3 changes: 1 addition & 2 deletions preload/scripts/characters/tankman.hxc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import funkin.play.character.MultiSparrowCharacter;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;

class TankmanCharacter extends MultiSparrowCharacter {
Expand All @@ -11,7 +10,7 @@ class TankmanCharacter extends MultiSparrowCharacter {
{
super.onNoteHit(event);

if (!event.note.noteData.getMustHitNote() && characterType == CharacterType.DAD) {
if (!event.note.noteData.getMustHitNote() && characterType == 'dad') {
// Override the hit note animation.
switch(event.note.kind) {
case "ugh":
Expand Down
7 changes: 3 additions & 4 deletions preload/scripts/stages/schoolErect.hxc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import funkin.play.PlayState;
import funkin.play.stage.Stage;
import funkin.play.character.CharacterType;
import funkin.graphics.shaders.DropShadowShader;

class SchoolErectStage extends Stage
Expand Down Expand Up @@ -35,7 +34,7 @@ class SchoolErectStage extends Stage
rim.distance = 5;

switch(charType){
case CharacterType.BF:
case 'bf':

rim.angle = 90;
character.shader = rim;
Expand All @@ -51,7 +50,7 @@ class SchoolErectStage extends Stage
}
};

case CharacterType.GF:
case 'gf':

rim.setAdjustColor(-42, -10, 5, -25);
rim.angle = 90;
Expand All @@ -67,7 +66,7 @@ class SchoolErectStage extends Stage
rim.updateFrameInfo(getGirlfriend().frame);
};

case CharacterType.DAD:
case 'dad':

rim.angle = 90;
character.shader = rim;
Expand Down
7 changes: 3 additions & 4 deletions preload/scripts/stages/schoolPico.hxc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import funkin.play.PlayState;
import funkin.play.stage.Stage;
import funkin.graphics.shaders.DropShadowShader;
import funkin.play.character.CharacterType;

class SchoolPicoStage extends Stage
{
Expand Down Expand Up @@ -35,7 +34,7 @@ class SchoolPicoStage extends Stage
rim.distance = 5;

switch(charType){
case CharacterType.BF:
case 'bf':

rim.angle = 90;
character.shader = rim;
Expand All @@ -51,7 +50,7 @@ class SchoolPicoStage extends Stage
}
};

case CharacterType.GF:
case 'gf':

rim.angle = 90;
character.shader = rim;
Expand All @@ -66,7 +65,7 @@ class SchoolPicoStage extends Stage
rim.updateFrameInfo(getGirlfriend().frame);
};

case CharacterType.DAD:
case 'dad':

rim.angle = 90;
character.shader = rim;
Expand Down
1 change: 0 additions & 1 deletion preload/scripts/stages/spookyMansionErect.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import funkin.util.FlxTweenUtil;
import flixel.util.FlxTimer;
import funkin.play.character.BaseCharacter;
import funkin.play.character.CharacterDataParser;
import funkin.play.character.CharacterType;
import funkin.play.PlayState;
import funkin.graphics.shaders.RuntimeRainShader;

Expand Down
7 changes: 3 additions & 4 deletions preload/scripts/stages/tankmanBattlefieldErect.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import flixel.math.FlxAngle;
import funkin.play.PlayState;
import funkin.play.stage.Stage;
import funkin.graphics.shaders.DropShadowShader;
import funkin.play.character.CharacterType;
import openfl.display.BitmapData;
import flixel.graphics.FlxGraphic;

Expand Down Expand Up @@ -38,7 +37,7 @@ class TankmanBattlefieldErectStage extends Stage
// character.animation.callback = rim.onAttachedFrame;

switch(charType){
case CharacterType.BF:
case 'bf':

rim.angle = 90;

Expand All @@ -49,7 +48,7 @@ class TankmanBattlefieldErectStage extends Stage
}
};

case CharacterType.GF:
case 'gf':

rim.angle = 90;

Expand All @@ -63,7 +62,7 @@ class TankmanBattlefieldErectStage extends Stage
rim.useAltMask = true;
}

case CharacterType.DAD:
case 'dad':

rim.angle = 135;
rim.threshold = 0.3;
Expand Down