-
Notifications
You must be signed in to change notification settings - Fork 29
Held Dash Refill
Authors: psyGamer
A Held Dash Refill allows Madeline to travel along a predetermined path.
The travel speed is calculated with a configurable multiplier (HeldRefill.SpeedMult), using the formula of Speed = SpeedMult * 64px/s.
The resulting is speed is the magnitude of both the X and Y components.
To use the refill, simply hold down any Dash (X/C) or Demo (Z,V) binding, while Madeline's hurtbox (green) is inside the refill's hitbox.
As long as either dash button is held down, Madeline will continue to travel along the fixed path with a constant speed.
Using it will refill Madeline's dashes, but unlike regular refills, not her stamina!
Once the path reaches it's end or no more dash buttons are held down, Madeline will return to StNormal and continue regularly with her movement.
In case Madeline is actively touching the ground, she can perform a regular jump to cancel the movement and return to StNormal.
All other inputs are ignored while traveling with the refill.
With a depth of -100, the refill will update after Madeline.
This means that before any of it's checks are performed, Madeline still updates on her own.
The consequences of that are especially noticeable while initiating the held dash or when the path changes the direction of travel.
Because of that, the earliest possible grab of the refill will never show a frame of Madeline actually intersecting with the refill's hitbox as everything happens within a single frame.
That also means that one might still have to hold a direction on the same frame as the dash starts, to even reach the refill: e.g. 7,R 13,R,X instead of 7,R 13,X.
Tip
Since Madeline updates first, if she is able to dash, that will take priority over holding onto the refill, since it happens earlier in the frame. To avoid that, the Crouch Dash Mode can be change to Hold which will still trigger the refill without actually starting a dash:
7,R
Set,CrouchDashMode,Hold
# Grab onto the refill
13,Z
# Reset back to allow for regular demo dashes again
Set,CrouchDashMode,Press
2,R
Madeline will still move regularly with the speed given by the refill before being snapped back onto the correct path.
This usually isn't a problem, but might cause issues in case an entity checks Madeline's position after she moved but hasn't been snapped back yet.
For that to happen, the entity's depth would need to be between 0 (Madeline) and -100 (Refill).