YesNoOk
avatar

How do I fix the MVC1 dash bug? (Read 2237 times)

Started by SNEAKYTING, December 20, 2019, 12:28:40 am
Share this topic:
How do I fix the MVC1 dash bug?
New #1  December 20, 2019, 12:28:40 am
  • *
    • USA
I'm having trouble editing the character template's dashing. I tried to map It to make it where when you hop or dash forward by pressing 2 Punch buttons then press down to cancel and repeat. When I do that "Dash & Crouch" trick, the character flies or all over the place as I can constantly press the Dash shortcut buttons as many times as I want without crouching and when you use the 2 Punch buttons as a Dash Shortcut during the character's throw, it will cancel out it's own throw, causing the opponent get stuck in an endless loop.
https://streamable.com/xgb3t
And that template uses  the JinKazama's dash coding, too where it should've been more like this...
https://streamable.com/f5udt
This...
https://streamable.com/99h90
And this where they can dash and properly cancel by prressing down and not interrupting their throws nor flying around.
https://streamable.com/c72nf
These are the codes that I inserted in the commands.

[command]
name = "xyz"
command = x+y
time = 8

[command]
name = "xyz"
command = x+z
time = 8

[command]
name = "xyz"
command = y+z
time = 8
;--------------------------------------------------------
;Run Fwd
;ƒ_ƒbƒvƒ…
[state -1, run Fwd]
type = changestate
value = 100 + (2*(statetype = a))
trigger1 = (command = "FF") && (stateno !=[100,106]) && (var(2) = 0)
trigger1 = ctrl
trigger2 = (command = "xyz") && (command != "holdback")

;---------------------------------------------------------------------------
;run back
;œã‘þƒ_ƒbƒvƒ…
[state -1, run back]
type = changestate
value = 105
trigger1 = command = "BB"
trigger1 = (statetype = s) && (stateno !=[100,106])
trigger1 = ctrl
trigger2 = (command = "xyz") && (command = "holdback")


[statedef 100]
type    = s
movetype= a
physics = n
ctrl = 1
anim = 100
sprpriority = 1

[state 100, 1]
type = velset
trigger1 = time = 0
x = 7

[state 192, 2]
type = playsnd
trigger1 = animelem = 5
value = 0, 17

[state 100, 4]
type = explod
trigger1 = time = 4
id = 100
anim = 6014
postype = p1
pos = 0,0
ownpal = 1
bindtime = 1
sprpriority = 5
persistent = 0
removeongethit = 1

;flame
[State 10, 1]
type = Explod
trigger1 = animelem = 1
;trigger2 = anim = 20
Removeongethit = 1
pos = 0,-80
removetime = 24
anim = 102
postype = p1
bindtime = -1
sprpriority = -5
persistent = 0
scale = 1.5,1
id = 111

[state 100, 5]
type = assertspecial
trigger1 = 1
flag = nowalk

[state 100, 6]
type = playsnd
trigger1 = animelem = 1
value = 0,27

[state 100, 7]
type = changestate
trigger1 = time = 25
value = 101

;------------------------
; Dash Forward (land)
[statedef 101]
type    = s
physics = s
velset = 3,0
ctrl = 0
anim = 101

[state 101, 2]
type = makedust
trigger1 = animelem = 2
pos = 0,0
spacing = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,16

[state 100, 7]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Dash Forward
[statedef 102]
type    = A
movetype= a
physics = n
ctrl = 1
anim = 100
sprpriority = 1

[state 100, 1]
type = velset
trigger1 = time = 0
x = 7

[state 192, 2]
type = playsnd
trigger1 = animelem = 5
value = 0, 17

[state 100, 4]
type = explod
trigger1 = time = 4
id = 100
anim = 6014
postype = p1
pos = 0,0
ownpal = 1
bindtime = 1
sprpriority = 5
persistent = 0
removeongethit = 1

;flame
[State 10, 1]
type = Explod
trigger1 = animelem = 1
;trigger2 = anim = 20
Removeongethit = 1
pos = 0,-80
removetime = 24
anim = 102
postype = p1
bindtime = -1
sprpriority = -5
persistent = 0
scale = 1.5,1
id = 112

[state 100, 5]
type = assertspecial
trigger1 = 1
flag = nowalk

[state 100, 6]
type = playsnd
trigger1 = animelem = 1
value = 0,27

[state 100, 7]
type = changestate
trigger1 = time = 25
value = 460

[state 50, 12]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y > 0
value = 460

;---------------------------------------------------------
; Dash back
[statedef 105]
type    = s
movetype= a
physics = n
ctrl = 0
anim = 105
sprpriority = 1

[state 100, 1]
type = velset
trigger1 = time = 0
x = -14

[state 105, 1]
type = velset
trigger1 = time = 0
x = const(velocity.run.back.x)

[state 105, 4]
type = assertspecial
trigger1 = 1
flag = nowalk

[State 105,5]
type = AssertSpecial
trigger1 = 1
flag = Nocrouchguard

[State 105,5]
type = AssertSpecial
trigger1 = 1
flag = Nostandguard

[state 105, 5]
type = playsnd
trigger1 = animelem = 1
value = 0,17
channel = 0

;flame
[State 10, 1]
type = Explod
trigger1 = animelem = 1
;trigger2 = anim = 20
Removeongethit = 1
pos = -10,-80
removetime = 13
anim = 107
postype = p1
bindtime = -1
sprpriority = -5
persistent = 0

[state 105, 6]
type = changestate
trigger1 = time = 25
value = 106

;---------------------------------------------------------
; Dash back (land)
[statedef 106]
type    = s
physics = s
ctrl = 0
anim = 106

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,16

[state 106, 3]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

So is there a way to help me fix those states/commands so that way the character can either dash forward or hop forward properly without causing bugs like interrupting throws and flying through floors? If not, Is it Okay for me to borrow Mouser's Dashing code or would that be out of character by MVC1 standards?
Last Edit: January 02, 2020, 03:20:30 am by SNEAKYTING
Re: How do I fix the MVC1 dash bug?
#2  December 20, 2019, 10:36:33 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Nobody should care about you using code from other people.

Not dealing with all of that. But your trigger2 for the dash is too permissive. Add in some more limiting factors. Either ctrl is required or must already be in the dash state. Or simply it can be done from crouching states 20-22. Should stop it from cancelling out of others throws and the like.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: How do I fix the MVC1 dash bug?
#3  December 20, 2019, 12:26:03 pm
  • ***
    • Italy
    • mark.nar@hotmail.it
Hey, Sneakything:

Quote
[statedef 100]
type    = s
movetype= a
physics = n
ctrl = 1 <-------------- set ctrl to "0"
anim = 100
sprpriority = 1
Re: How do I fix the MVC1 dash bug?
#4  December 23, 2019, 08:09:50 am
  • *
    • USA
Hey, Sneakything:

Quote
[statedef 100]
type    = s
movetype= a
physics = n
ctrl = 1 <-------------- set ctrl to "0"
anim = 100
sprpriority = 1

Thanks for the small help, but I can't crouch to cancel the full dash, though.
Re: How do I fix the MVC1 dash bug?
#5  December 23, 2019, 10:20:19 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Thats because his help turned ctrl off. You can bypass that a little but iirc most dashes in Vs games let you attack from them so turning off ctrl isn't the right choice. Try what i said earlier and define WHEN you can use the dash rather than at any time which is how you had it set up.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: How do I fix the MVC1 dash bug?
#6  December 23, 2019, 12:11:21 pm
  • ******
Can't you just add ctrl = 0 and then, in the command changestates for punches and kicks (all standing and crouching attacks), add a trigger that refers to the dash state/s?


In the .cmd, in the changestate of the dash state you could add
Code:
trigger"n"= StateNo = 100 && Time >= 3

- "n" is a number you need, I just put it there because I don't know how your commands are organized or how many triggers you have.

- StateNo 100 is what I assume your dash state is numbered, I don't know if you have many of those so I just put that value. You could have many dash states like 101 and 102 and 103 and so on, so you would write StateNo = [100,102] with 102 being the last state.

- I also added Time >= 3, you can have the attacks being possible to do later than that value (in ticks), I put it there so you can't cancel the dash immediately, without actually dashing/moving forward.
If you use the brackets for more state as I said earlier, you need to also use parentheses.
Like so:
Code:
trigger"n"= (StateNo = [100,102]) && Time >= 3


In the .cns, in the actual dash state, you could add a ChangeState that allows you to go to the crouching state with a command (usually "down" is the command) as one of its triggers.

I hope this helps. I also hope you don't just copy and paste without understanding what I said. :P
Re: How do I fix the MVC1 dash bug?
#7  December 23, 2019, 01:09:13 pm
  • *****
  • Shame on you!
    • USA
Usually if I have a move I need to "break out" of, I'll put the changestates inside the state. Instead of the cmd, I just put it at the bottom like any other changestate.

But if you don't limit when the move can be activated in the cmd, like Cyanide said, the AI is going to have a field day with it. Your
trigger2 = (command = "xyz") && (command != "holdback")
is the only problem I see.

How/Why do you want the BB/FF commands to be different than the XYZ?
vVv Ryuko718 Updated 10/31/22 vVv
Re: How do I fix the MVC1 dash bug?
#8  December 23, 2019, 10:11:24 pm
  • *
    • USA
Usually if I have a move I need to "break out" of, I'll put the changestates inside the state. Instead of the cmd, I just put it at the bottom like any other changestate.

But if you don't limit when the move can be activated in the cmd, like Cyanide said, the AI is going to have a field day with it. Your
trigger2 = (command = "xyz") && (command != "holdback")
is the only problem I see.

How/Why do you want the BB/FF commands to be different than the XYZ?

I thought having 2 punch buttons as a shortcut for dashing was a thing in Marvel vs. Capcom games, especially MVC1 & MVC2. Is there an alternative to replace that command, "trigger2 = (command = "xyz") && (command != "holdback")"?
Re: How do I fix the MVC1 dash bug?
#9  December 23, 2019, 11:14:47 pm
  • *
    • USA
Thank you so much. I got it working now, but not the Backwards Dash Cancel, though. Also, for a bonus/optional question is it possible to make a character shoot a projectile & it's hit box as a Helper like Silver Samurai's Shurien or Oliver's Metal Blade while having each command shoot upwards, straight & downwards on ground and in air like Iceman(Children Of The Atom Variant).
Re: How do I fix the MVC1 dash bug?
#10  December 24, 2019, 06:45:14 pm
  • ***
  • MvC Adict!!
    • Argentina
    • marvelvscapcomextreme.000webhostapp.com
Thank you so much. I got it working now, but not the Backwards Dash Cancel, though. Also, for a bonus/optional question is it possible to make a character shoot a projectile & it's hit box as a Helper like Silver Samurai's Shurien or Oliver's Metal Blade while having each command shoot upwards, straight & downwards on ground and in air like Iceman(Children Of The Atom Variant).

For backwards dash cancel, put this into the command chagestate of 105 (backward dash)

Code:
trigger1 = (command = "holdback2" && command = "recovery")

Don´t forget to add this command

Code:
[Command]
name = "holdback2"
command = /B
time = 1

The recovery one is this one.. add it, or change it for the one you have it:

Code:
[Command]
name = "recovery"
command = x+y
time = 1
[Command]
name = "recovery"
command = y+x
time = 1
[Command]
name = "recovery"
command = y+z
time = 1

EDIT: posicionate the dash backward command after the special attacks... and BEFORE the dash fwd, throws and normal attacks, like this:

Code:
[b]SPECIAL ATTACKS[/b]
[State -1]
type = ChangeState
value = 1230
triggerall = roundstate = 2 && !var(59) && var(6) < 2
triggerall = command = "236_c"
triggerall = !numprojid(6000)
triggerall = pos y < -15
trigger1 = statetype = A && ctrl
trigger2 = stateno = 600
trigger3 = stateno = 610
trigger4 = stateno = 620
trigger5 = stateno = 630
trigger6 = stateno = 640
trigger7 = stateno = 650
trigger8 = stateno = 700
trigger9 = stateno = 660

[b]DASH BACKWARD[/b]
[State -1]
type = ChangeState
value = 105
triggerall = roundstate = 2 && !var(59)
trigger1 = (command = "holdback2" && command = "recovery") || (StateType != A && command = "BB")
trigger1 = statetype = S && ctrl

[b]DASH FWD[/b]
[State -1]
type = ChangeState
value = 100
triggerall = roundstate = 2 && !var(59)
trigger1 = (command = "recovery") || (StateType != A && command = "FF")
trigger1 = statetype = S && ctrl

 
[b]THROWS[/b]
[State -1]
type = ChangeState
value = 900
triggerall = roundstate = 2 && !var(59)
trigger1 = command = "z" && (command = "holdfwd" || command = "holdback")
trigger1 = p2bodydist x < 10 && p2statetype != A && p2movetype != h
trigger1 = statetype = S && ctrl

; “Š‚°2
[State -1]
type = ChangeState
value = 910
triggerall = roundstate = 2 && !var(59)
trigger1 = command = "c" && (command = "holdfwd" || command = "holdback")
trigger1 = p2bodydist x < 10 && p2statetype != A && p2movetype != h
trigger1 = statetype = S && ctrl

; ‹ó’†“Š‚°
[State -1]
type = ChangeState
value = 920
triggerall = roundstate = 2 && !var(59)
trigger1 = command = "z" && (command = "holdfwd" || command = "holdback")
trigger1 = p2bodydist x < 15 && abs(p2bodydist y) < 15 && p2statetype != A && p2movetype != h
trigger1 = statetype = A && ctrl
 
[b]NORMAL ATTACK[/b]
[State -1]
type = ChangeState
value = 221
triggerall = roundstate = 2 && !var(59)
triggerall = command = "z" && command = "holdfwd" && command != "holddown"
trigger1 = statetype = S && ctrl
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 210 && movecontact
trigger4 = stateno = 230 && movecontact
trigger5 = stateno = 240 && movecontact
trigger6 = stateno = 400 && movecontact
trigger7 = stateno = 410 && movecontact
trigger8 = stateno = 430 && movecontact
trigger9 = stateno = 440 && movecontact

Try downloading the last akuma that I upload it and check how I coded all the dash move, should help you out.
Follow all the cns, cmd and air steps.
Marvel vs Capcom Extreme (find the MvC2 characters project right here too!):
marvelvscapcomextreme.000webhostapp.com

Follow the project on:
www.instagram.com/marvelvscapcomextreme/
www.youtube.com/c/MarvelvsCapcomExtreme
www.player.me/marvelvscapcomextreme/

I recieved messages of users that want to donate from paypal or patreon, if you consider that this is a nice and very dedicated project, you can donate any amount that you want right here:
www.paypal.me/marianoemeschini
Last Edit: December 24, 2019, 06:49:03 pm by REDHOT
Re: How do I fix the MVC1 dash bug?
#11  December 24, 2019, 11:39:53 pm
  • *
    • USA
Thank you so much. I got it working now, but not the Backwards Dash Cancel, though. Also, for a bonus/optional question is it possible to make a character shoot a projectile & it's hit box as a Helper like Silver Samurai's Shurien or Oliver's Metal Blade while having each command shoot upwards, straight & downwards on ground and in air like Iceman(Children Of The Atom Variant).

For backwards dash cancel, put this into the command chagestate of 105 (backward dash)

Code:
trigger1 = (command = "holdback2" && command = "recovery")

Don´t forget to add this command

Code:
[Command]
name = "holdback2"
command = /B
time = 1

The recovery one is this one.. add it, or change it for the one you have it:

Code:
[Command]
name = "recovery"
command = x+y
time = 1
[Command]
name = "recovery"
command = y+x
time = 1
[Command]
name = "recovery"
command = y+z
time = 1

EDIT: posicionate the dash backward command after the special attacks... and BEFORE the dash fwd, throws and normal attacks, like this:

Code:
[b]SPECIAL ATTACKS[/b]
[State -1]
type = ChangeState
value = 1230
triggerall = roundstate = 2 && !var(59) && var(6) < 2
triggerall = command = "236_c"
triggerall = !numprojid(6000)
triggerall = pos y < -15
trigger1 = statetype = A && ctrl
trigger2 = stateno = 600
trigger3 = stateno = 610
trigger4 = stateno = 620
trigger5 = stateno = 630
trigger6 = stateno = 640
trigger7 = stateno = 650
trigger8 = stateno = 700
trigger9 = stateno = 660

[b]DASH BACKWARD[/b]
[State -1]
type = ChangeState
value = 105
triggerall = roundstate = 2 && !var(59)
trigger1 = (command = "holdback2" && command = "recovery") || (StateType != A && command = "BB")
trigger1 = statetype = S && ctrl

[b]DASH FWD[/b]
[State -1]
type = ChangeState
value = 100
triggerall = roundstate = 2 && !var(59)
trigger1 = (command = "recovery") || (StateType != A && command = "FF")
trigger1 = statetype = S && ctrl

 
[b]THROWS[/b]
[State -1]
type = ChangeState
value = 900
triggerall = roundstate = 2 && !var(59)
trigger1 = command = "z" && (command = "holdfwd" || command = "holdback")
trigger1 = p2bodydist x < 10 && p2statetype != A && p2movetype != h
trigger1 = statetype = S && ctrl

; “Š‚°2
[State -1]
type = ChangeState
value = 910
triggerall = roundstate = 2 && !var(59)
trigger1 = command = "c" && (command = "holdfwd" || command = "holdback")
trigger1 = p2bodydist x < 10 && p2statetype != A && p2movetype != h
trigger1 = statetype = S && ctrl

; ‹ó’†“Š‚°
[State -1]
type = ChangeState
value = 920
triggerall = roundstate = 2 && !var(59)
trigger1 = command = "z" && (command = "holdfwd" || command = "holdback")
trigger1 = p2bodydist x < 15 && abs(p2bodydist y) < 15 && p2statetype != A && p2movetype != h
trigger1 = statetype = A && ctrl
 
[b]NORMAL ATTACK[/b]
[State -1]
type = ChangeState
value = 221
triggerall = roundstate = 2 && !var(59)
triggerall = command = "z" && command = "holdfwd" && command != "holddown"
trigger1 = statetype = S && ctrl
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 210 && movecontact
trigger4 = stateno = 230 && movecontact
trigger5 = stateno = 240 && movecontact
trigger6 = stateno = 400 && movecontact
trigger7 = stateno = 410 && movecontact
trigger8 = stateno = 430 && movecontact
trigger9 = stateno = 440 && movecontact

Try downloading the last akuma that I upload it and check how I coded all the dash move, should help you out.
Follow all the cns, cmd and air steps.

I tried, yet, now when I hold back & press Y+Z, He dashes forward. Plus, the character template doesn't even have a [State 221], unless if that's just an example, but still, thanks for the advice on coding.