diff --git a/source/funkin/game/HealthIcon.hx b/source/funkin/game/HealthIcon.hx index a7706a86..1c7bb59d 100644 --- a/source/funkin/game/HealthIcon.hx +++ b/source/funkin/game/HealthIcon.hx @@ -50,12 +50,12 @@ class HealthIcon extends FlxSprite public function new(char:String = 'bf', isPlayer:Bool = false) { + super(); health = 0.5; this.isPlayer = isPlayer; setIcon(char); scrollFactor.set(); - super(); } public function setIcon(char:String, width:Int = 150, height:Int = 150) { diff --git a/source/funkin/game/SplashHandler.hx b/source/funkin/game/SplashHandler.hx index dc6f7533..78ed86ce 100644 --- a/source/funkin/game/SplashHandler.hx +++ b/source/funkin/game/SplashHandler.hx @@ -40,7 +40,10 @@ class SplashHandler extends FlxTypedGroup { var __grp:SplashGroup; public function showSplash(name:String, strum:Strum) { __grp = getSplashGroup(name); - add(__grp.showOnStrum(strum)); + var event = funkin.backend.scripting.EventManager.get(funkin.backend.scripting.events.DynamicEvent).recycle(__grp.showOnStrum(strum), strum); + event = PlayState.instance.scripts.event("onSplashShown", event); + if (!event.cancelled) + add(__grp.showOnStrum(strum)); // max 8 rendered splashes while(members.length > 8) diff --git a/source/funkin/game/Strum.hx b/source/funkin/game/Strum.hx index 0e179f71..5a0299d8 100644 --- a/source/funkin/game/Strum.hx +++ b/source/funkin/game/Strum.hx @@ -14,6 +14,8 @@ class Strum extends FlxSprite { public var cpu = false; // Unused public var lastHit:Float = -5000; + public var strumLine = null; + public var scrollSpeed:Null = null; // custom scroll speed per strum public var noteAngle:Null = null; diff --git a/source/funkin/game/StrumLine.hx b/source/funkin/game/StrumLine.hx index d743dd79..e00e58f8 100644 --- a/source/funkin/game/StrumLine.hx +++ b/source/funkin/game/StrumLine.hx @@ -303,6 +303,7 @@ class StrumLine extends FlxTypedGroup { animPrefix = strumAnimPrefix[i % strumAnimPrefix.length]; var babyArrow:Strum = new Strum(startingPos.x + ((Note.swagWidth * strumScale) * i), startingPos.y); babyArrow.ID = i; + babyArrow.strumLine = this; if(data.scrollSpeed != null) babyArrow.scrollSpeed = data.scrollSpeed;