YesNoOk
avatar

My Step Dashes are Infinite and shouldn't be, help! (Read 4760 times)

Started by JasonThePhoenix, July 09, 2024, 04:01:34 am
Share this topic:
My Step Dashes are Infinite and shouldn't be, help!
#1  July 09, 2024, 04:01:34 am
  • **
    • UK
How do I fix this bug where if I use my Character's Forward Dash to run through the foe and keep pressing it, my character can cancel forward dash into forward dash forever to fill his meter in seconds, and cancel backdash into backdash to remain invincible forever?

That's not intended behaviour.

I love Sailor Moon as much as the next fighting game fan but this character isn't supposed to hit the foe once and backdash forever. Forward Dash is supposed to reward you with a small amount of meter, plus some extra meter if you Graze through an enemy projectile Touhou style, not fill the whole bar in under a second.

Character code:

; Forward Dash - Meant to last 12 frames and be projectile invulnerable

[Statedef 100]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 100
sprpriority = 1

[State 100, 1]
type = nothitby
trigger1 = Time = [0,12]
value = , AP
time = 1

[State 100, 2]
type = velset
trigger1 = Time = 0
x = 75
y = 0

[State 100, PlayerPush]
type = PlayerPush
trigger1 = Time = [0,10]
value = 0

[State 100, 4]
type = ChangeState
trigger1 = Time = 12
value = 0
ctrl = 1

[State 100, PowerAdd]
type = PowerAdd
trigger1 = Time = 0
value = 250
ignorehitpause = 1
;persistent =

;why isn't this projectile graze bonus working?
[State 100, PowerAdd]
type = PowerAdd
trigger1 = projcontacttime(1) >= 1
value = 9999
ignorehitpause = 1

;---------------------------------------------------------------------------
; Backdash - 20F, Invul until 16F.

[Statedef 105]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 105
sprpriority = 1

[State 105, 1]
type = hitby
trigger1 = Time = [0,16]
value = A,AT
time = 1

[State 105, 2]
type = velset
trigger1 = Time = 0
x = -45
y = 0

[State 105, 3]
type = ChangeState
trigger1 = Time = 20
value = 0
ctrl = 1

Controls code:

[State -1, Back Dash shortcut]
type = ChangeState
value = 105
triggerall = prevstateno !=110
triggerall = prevstateno !=105
triggerall = prevstateno !=100
triggerall = StateNo != 100
triggerall = StateNo != 105
triggerall = statetype != A
triggerall = ctrl
triggerall = command != "holdfwd"
trigger1 = command = "c"
trigger1 = command = "holdback"

[State -1, Forward Dash shortcut]
type = ChangeState
value = 100
triggerall = prevstateno !=110
triggerall = prevstateno !=105
triggerall = prevstateno !=100
triggerall = StateNo != 100
triggerall = StateNo != 105
triggerall = statetype != A
triggerall = ctrl
triggerall = command != "holdback"
trigger1 = command = "c"
trigger1 = command = "holdfwd"

[State -1, Dash Fwd]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Dash Back]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl
Re: My Step Dashes are Infinite and shouldn't be, help!
#2  July 09, 2024, 11:18:10 am
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
Check to make sure the character isn't giving itself ctrl via CtrlSet elsewhere, though are you sure it's a cancel? 12f is a very short duration, less than 1/4 of a second.

Oh, I want a diagram. I fucking love diagrams.
Re: My Step Dashes are Infinite and shouldn't be, help!
#3  July 09, 2024, 10:41:07 pm
  • *****
  • Shame on you!
    • USA
You also might want to use the same triggeralls for the two sets of changestates in statedef -1. The shortcut seems locked out, but manual isn't?
You might want to send P1 to a "recover" state for forward and back dashes. 101 and 106 are usually used to stop the spamming.


----
Also
value = 250
When I was reading your description of what you wanted I was thinking value = 15. 30 maximum.


trigger1 = projcontacttime(1) >= 1
Isn't going to work for helper type projectiles. You might want to make a helper locked to P1 that can detect P2's attack helpers, then tell Root to add power.
vVv N00bSaibot & Muramasa RoofTop vVv
Last Edit: July 09, 2024, 10:56:20 pm by Odb718