StopDash¶
This coroutine allows to stop a DashBehavior and must be called to stop it when the player is dashing. CancelAction can call it automatically in these circumstances.
public IEnumerator StopDash(bool wall)
Parameters¶
wall: Tells if the stopping is due to hitting a wall which implicates more visual effects such as aDeath3sound
Procedure¶
- If wall is true:
Death3sound plays- entity.
forcemoveis set to false - entity.animstate set to 11 (
Hurt) - ShakeScreen called with an ammount of (0.1, 0.1, 0.1) for 0.2 time
smokeis moved offscreen then gets destroyed in 1.5 seconds- If
tboxexists, it is destroyed - entity.
detecttag is reset toUntagged - Yield for a frame
- entity.
rigidx and z velocity are reset to 0.0 diggingpartreset to nulldashingis set to false- Yield for 0.25 seconds
- entity.
animstateset to 0 (Idle) - entity.
jumpcooldownset to 5.0 so no jumps can happen for the next 5.0 frames actioncooldownset to 5.0 so no DoActionTap can be done for the next 5.0 framesmovecdreset to 0.0- CancelAction is called if all of the following conditions are true:
- We aren't in an instance.
pause - We aren't in an instance.
minipause - We aren't in instance.
inevent - The message lock is released
- The player isn't
digging - The player isn't
flying
- We aren't in an instance.