News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Ground and mid air attacks using same command sequence

Started by prowlerx083, January 10, 2008, 05:27:55 AM

Previous topic - Next topic

prowlerx083

So, I'm trying to make a mid air dash attack type move similar to amingo's, but i'm having trouble with the commands. 

I'm using the qcf+z, which is also a command I use for a ground based move. I have set the move type to be in the air (statetype = A) but it still doesn't work. When I replace a previous single button command, it works just fine, but I can't figure out how to tell mugen to use the same command that applies only in the air.

Bastard Mami

post the cmd code for both of yoru attacks, one should have statetype=A in the triggers while the toher should have statetype != A

prowlerx083

here's the commands:

Quote[Command]
name = "midspin"
command = ~D, DF, F, z
time = 15

[command]
name = "hroll"
command = ~D, DF, F, z
time = 15

and here's the triggers

Quote;Ground spin
[state -1, hRoll]
Type = Changestate
value = 1010
Triggerall = command = "hroll"
trigger1 = statetype = S
Trigger1 = Ctrl

;Mid airs pin
[state -1, Midair spin]
Type = Changestate
value = 1006
Triggerall = command = "midspin"
trigger1 = statetype = A
trigger2 = ctrl

Cyanide

Press ctrl+D in game, then do both moves. Tell us if there's an error message. If there's not, post the cns data for state 1006.


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.

prowlerx083

Nope, it didn't do anything

Here's the cns data
Quote;mid-air spin
[statedef 1006]
type    = A
movetype= a
physics = n
power = 100
ctrl = 0
anim = 999
velset = 0,0

[State 820, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1000,0

[state 820, 1]
type = varset
trigger1 = time = 0
v = 4
value = 1

[state 820, 1]
type = velset
trigger1 = animelem = 10
x = 15

[state 820, 1]
type = velset
trigger1 = animelem = 10
x = 8

[state 820, 1]
type = varset
trigger1 = time = 0
v = 0
value = 0

[State 1000, 6]
type = HitDef
trigger1 = time%5 = 0
trigger1 = var(0) < 2
attr = S, SA
animtype  = Heavy
damage    = 17,3
guardflag = MA
hitflag = MAFD
pausetime = 3,3
sparkxy = -60,-40
hitsound = -1
sparkno = s6005
givepower = 10,1
getpower = 20,5
guard.sparkno = s6000
guardsound = -1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 20
ground.velocity = -3.5
air.velocity = -2.5, -3
down.velocity = -3,-5
fall.animtype = hard
yaccel = .6
air.hittime = 28

[State 1000, 6]
type = HitDef
triggerall = time%5 = 0
trigger1 = var(0) = 2
trigger2 = time > 19
attr = S, SA
animtype  = Heavy
damage    = 17,3
guardflag = MA
hitflag = MAFD
pausetime = 3,3
sparkxy = -60,-40
hitsound = -1
guardsound = -1
sparkno = s6005
guard.sparkno = s6000
givepower = 10,1
getpower = 20,5
ground.type = low
ground.slidetime = 12
ground.hittime  = 20
ground.velocity = -12,-8
air.velocity = -12, -8
down.velocity = -3,-5
fall.animtype = hard
fall = 1
fall.recover = 0
yaccel = .6
air.hittime = 28

[state 820, 1]
type = movehitreset
trigger1 = movecontact
ignorehitpause = 1

[state 820, 1]
type = velmul
trigger1 = time > 15
x = .9

[state 820, 1]
type = changestate
trigger1 = time = 15
value = 51

Cyanide

I see no real reason for that not to work.

Delete the midspin command and have the air dash work off hroll instead. Cannot think of anything else that could possibly be assing it up aside from.

Copy paste midspin changestate so you have 2. Stick with 2, see what happens. (i hate this it's fucking stupid, but often works)


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.

XGargoyle

as far as I know (my coding skills are a bit rusty though) you can't have 2 identical commands with different name. So, do as Cyanide said. Consolidate both commands as a new one "QCF_z", and then replace the name on both states

Edit: also make sure that the [commands] are placed in the right order in the CMD file.


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!

Cybaster

Quote from: XGargoyle on January 10, 2008, 11:56:28 AM
you can't have 2 identical commands with different name.
??? o_O

I have seen many characters with unptimized code use various names for the same command, because the move was performed in the air or on the ground or during a particular state, and I'm pretty sure it worked.

XGargoyle

Quote from: Warbaster on January 10, 2008, 11:59:59 AM
Quote from: XGargoyle on January 10, 2008, 11:56:28 AM
you can't have 2 identical commands with different name.
??? o_O

I have seen many characters with unoptimized and sloppy code use various names for the same command, because the move was performed in the air or on the ground or during a particular state, and I'm pretty sure it worked.

Fixed.


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!

prowlerx083

#9
Okay, wow, there must be something wrong that you guys aren't seeing, cause it still doesn't work. I even tried testing it out by ";"ing out the hroll attack, but here's the weird thing, cause when I did that, It did work, but only when I was on the ground.  o_O

Here's the reformed code:

Quote;Heavy roll
[state -1, hRoll]
Type = Changestate
value = 1010
Triggerall = command = "hroll"
trigger1 = statetype = S
Trigger1 = Ctrl

;Mid airs pin
[state -1, Midair spin]
Type = Changestate
value = 1006
Triggerall = command = "hroll"
trigger1 = statetype = A
trigger2 = ctrl

;Mid airs pin
[state -1, Midair spin]
Type = Changestate
value = 1006
Triggerall = command = "hroll"
trigger1 = statetype = A
trigger2 = ctrl

...maybe I could PM one of you guys and just send the whole char so you can tell?

EDIT:
Well, so far, I decided to use the "FF" command and it works great, and I can still do the same dash as before on the ground.  But if you guys are bored, the offers still stands to figure out on why the heck the other way didn't work.

Bastard Mami

Quote from: prowlerx083 on January 10, 2008, 05:59:20 AM
here's the commands:

Quote[Command]
name = "midspin"
command = ~D, DF, F, z
time = 15

[command]
name = "hroll"
command = ~D, DF, F, z
time = 15

and here's the triggers

Quote;Ground spin
[state -1, hRoll]
Type = Changestate
value = 1010
Triggerall = command = "hroll"
trigger1 = statetype = S
Trigger1 = Ctrl

;Mid airs pin
[state -1, Midair spin]
Type = Changestate
value = 1006
Triggerall = command = "midspin"
trigger1 = statetype = A
trigger2 = ctrl

currently not the cause, but this looks awfully suspicious of being wrong.

Cyanide

I would like to figure out what's going on please. PM me thanks.


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.

Cyanide

The culprit is, bad changestate ordering.

We were all thrown by the fact that the ground one works. Which it does, but only because you've disallowed the basic from activating if the command was "hroll" You haven't done this for midspin (the air basic) to stop anything happening. So as Z is an easier command than QCF+Z it's taking the default jump kick.

Fix your ordering. Complex command changestates should come before the less complex changestates.


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.

prowlerx083

Hey, thanks Cyanide! I'll see if I can make that work. L=