YesNoOk
avatar

My character shouldnt be able to infinitely forward/backdash! Even AI's stumped! (Read 2781 times)

Started by JasonThePhoenix, January 04, 2025, 04:16:22 pm
Share this topic:
My character shouldnt be able to infinitely forward/backdash! Even AI's stumped!
#1  January 04, 2025, 04:16:22 pm
  • **
    • UK
Game-ruining bug: If you run through a foe with Forward Dash, the character is permanently able to infinitely cancel forward dashes into forward dashes, back dashes into back dashes, back dashes into forward dashes, and forward dashes into back dashes. This lets you remain invincible forever just by holding back and mashing C. This also lets you fill your power meter near-instantly for no cost with forward dashes and then become invincible forever with backdashes, if you want to hit your foe once with an invincible super and then remain invincible for the rest of the round.

I started out with this for commands:

[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"
;Run Fwd
[State -1, Dash Fwd]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Run Back
[State -1, Dash Back]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

And this for my state code:

; Forward Dash - 12F, proj invulnerability

[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 =

;---------------------------------------------------------------------------
; 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

Hours of bugtesting, adding triggerall = ctrl && statetype != A && stateno != 100 && stateno != 105 to the commands to begin dashing, combining the dash triggers, and using all my daily questions on all three ChatGPT accounts later with "that didn't work" message after "that didn't work" message... Nothing worked.

; Dash Trigger: Modified To Prevent Re-entry If Already Dashing
[State -1, Dash Trigger]
type = ChangeState
value = ifelse(command = "FF" || (command = "c" && command = "holdfwd"), 100, 105)
triggerall = ctrl
triggerall = statetype != A
triggerall = stateno != 100 && stateno != 105 ; Prevent dash re-entry if already dashing
trigger1 = command = "FF" || command = "BB" || (command = "c" && (command = "holdfwd" || command = "holdback"))

; Forward Dash - 12F, full proj invulnerability
[Statedef 100]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 100
sprpriority = 1

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

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

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

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

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

; Back Dash - 20F, Invul until 16F
[Statedef 105]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 105
sprpriority = 1

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

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

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

That didn't prevent the bug. And this didn't prevent the bug either.

; Forward Dash and Back Dash Trigger
[State -1, Dash Trigger]
type = ChangeState
value = ifelse((command = "FF" || (command = "c" && command = "holdfwd")) && stateno != 100, 100, ifelse((command = "BB" || (command = "c" && command = "holdback")) && stateno != 105, 105, 0))
triggerall = ctrl && statetype != A && stateno != 100 && stateno != 105
trigger1 = (command = "FF" || (command = "c" && command = "holdfwd") && stateno != 100) || (command = "BB" || (command = "c" && command = "holdback") && stateno != 105)

Nothing anywhere in my character code involves the C or FF commands or enables cancelling anything into or out of dashes, I checked.

I even removed my Roman Cancel code, and everything touching states 105 and 100 and the "c" and "FF" and "BB" code, that didn't work. Removing the state codes for states 100 and 105 meant there would be no forward or back dashes at all so I added those back in, but right now there are no commands for initiating those states as there seems to be no way to actually prevent infinite forward/back dashing.

Nothing should be enabling infinite dashes and infinite meter. I read the whole thing and I don't see anything. AI read the whole thing and doesn't see anything. Is my PC just haunted or something? It has no viruses. And I checked if I'm opening and editing the correct version of the character file and playing it in a real official mugen 1.1 build, and discovered that I am. Has the character file become self-aware and decided after I downloaded one Isekai anime too many it wants to be an invincible cheater now? The only code ANYWHERE involving C or FF/BB right now in the command file is this:

;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10

[Command]
name = "c"
command = c
time = 1
Last Edit: January 06, 2025, 09:53:28 am by JasonThePhoenix
Re: My character shouldnt be able to infinitely forward/backdash! Even AI's stumped!
#2  January 07, 2025, 11:31:09 pm
  • *

  • Online
Sorry if I got it wrong, this is what I tested your code with KFM ->


Your code I tested, no change, just copy&paste to KFM ->

kfm.cns (before [Statedef -2]):

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

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

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

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

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

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

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

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

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

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

kfm.cmd:

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

;Run Back
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl