The Mugen Fighters Guild

M.U.G.E.N Central => Introductions and Guides => Topic started by: eishiba on June 05, 2019, 01:31:32 am

Title: learning commands
Post by: eishiba on June 05, 2019, 01:31:32 am
I glanced around on the site but didn't see anything. where might one go to learn how write commands in fighter factory? I know basics like standing crouching and air moves but when trying to make moves that would be like forward forward A or something I don't know how to do this. I also see alot of odd punctuation marks in other characters commands. so I need to learn.
Title: Re: learning commands
Post by: PlasmoidThunder on June 05, 2019, 01:54:23 am
Kung Fu Man's .cmd has pretty substantial documentation within it that goes over this, so I suggest you take a look and come back if you're still stuck.
Title: Re: learning commands
Post by: eishiba on June 05, 2019, 05:45:34 pm
Kung Fu Man's .cmd has pretty substantial documentation within it that goes over this, so I suggest you take a look and come back if you're still stuck.

So I read over everything but I guess I'm still not doing something right. I'm trying to make a dashing attack.
https://www.youtube.com/watch?v=GReNRJW2JRI
Title: Re: learning commands
Post by: Maverick Hunter Omega on June 05, 2019, 08:58:24 pm
Add this line below your StateDef:

Code:
[State 300, VelSet]
type = VelSet
trigger1 = 1
x = X ; Where X is an int. Change X according to your preference
y = 0

Or if you want the movement of your character to be in pixels, add this below type = A
Code:
velset = X, 0 ; Again X is an int, change this number according to your preference.

Hope this helps.
Title: Re: learning commands
Post by: eishiba on June 05, 2019, 11:13:45 pm
Add this line below your StateDef:

Code:
[State 300, VelSet]
type = VelSet
trigger1 = 1
x = X ; Where X is an int. Change X according to your preference
y = 0

Or if you want the movement of your character to be in pixels, add this below type = A
Code:
velset = X, 0 ; Again X is an int, change this number according to your preference.

Hope this helps.

define"if you want the movement to be in pixels"
Title: Re: learning commands
Post by: PlasmoidThunder on June 06, 2019, 02:37:44 am
Omega Safeer, that's not what he's asking. He wants an attack you perform right after inputting a dash, not specifically an attack that dashes forward.

The reason I said Kung Fu Man is because he has a dashing attack called Kung Fu Knee that is performed by inputting forward, forward, A.

The command for the move is as follows:
Code:
[Command]
name = "FF_a"
command = F, F, a

While the ChangeState looks like this:
Code:
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1050
triggerall = command = "FF_a"
trigger1 = statetype != A
trigger1 = ctrl

Both trigger1s are actually handled by a combo conditional variable in Kung Fu Man, but for the sake of clarity I've put them here. In the event you've disabled ctrl in your run state, you'll want to replace the ctrl trigger with stateno = 100.
Title: Re: learning commands
Post by: eishiba on June 06, 2019, 03:40:08 am
Omega Safeer, that's not what he's asking. He wants an attack you perform right after inputting a dash, not specifically an attack that dashes forward.

The reason I said Kung Fu Man is because he has a dashing attack called Kung Fu Knee that is performed by inputting forward, forward, A.

The command for the move is as follows:
Code:
[Command]
name = "FF_a"
command = F, F, a

While the ChangeState looks like this:
Code:
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1050
triggerall = command = "FF_a"
trigger1 = statetype != A
trigger1 = ctrl

Both trigger1s are actually handled by a combo conditional variable in Kung Fu Man, but for the sake of clarity I've put them here. In the event you've disabled ctrl in your run state, you'll want to replace the ctrl trigger with stateno = 100.

I did notice kfms dashing attack. I truied to copy it.  this is a video of what I tried to do. hopefully from this you can tell. me what I did wrong.
https://www.youtube.com/watch?v=GReNRJW2JRI
Title: Re: learning commands
Post by: PlasmoidThunder on June 06, 2019, 04:40:42 am
It's very likely that the reason it's not activating is because the command priority is too low (as in, the ChangeState for the move is too far down). As a general rule, the simpler the motion, the lower down it goes; single-button inputs like Normals go at the bottom, while Hypers go at the top.

In short, the ChangeState for your 'Dash Light Charge' should be placed above 'Run Fwd'. While not the subject of your question, that QCF Y projectile should also be placed higher.
Title: Re: learning commands
Post by: eishiba on June 06, 2019, 07:34:01 pm
It's very likely that the reason it's not activating is because the command priority is too low (as in, the ChangeState for the move is too far down). As a general rule, the simpler the motion, the lower down it goes; single-button inputs like Normals go at the bottom, while Hypers go at the top.

In short, the ChangeState for your 'Dash Light Charge' should be placed above 'Run Fwd'. While not the subject of your question, that QCF Y projectile should also be placed higher.

I set the entire command for the dash light charge and put it above the run fwd state.
It's very likely that the reason it's not activating is because the command priority is too low (as in, the ChangeState for the move is too far down). As a general rule, the simpler the motion, the lower down it goes; single-button inputs like Normals go at the bottom, while Hypers go at the top.

In short, the ChangeState for your 'Dash Light Charge' should be placed above 'Run Fwd'. While not the subject of your question, that QCF Y projectile should also be placed higher.

https://imgur.com/GU5XVsS   
https://imgur.com/9epW3su

So I moved everything as you said and its still not working. Did I write everything in the states right? I'm still learning but I THINK i got the states all right. The animelem should be 1 since there is only one index in the hitdef. The two links are screen shots.

So, as a side note, I have been watching a series of videos on youtube by a username named ryon who did a series on how to make a character in mugen. Its 6 years old so asking him questions doesnt exist but i tried to make what im making close to his so i can learn. I was on a...lesser forum and never got answers and was refered here to learn commands and I'm actually getting answers and its GREAT! The projectile and a grab neither work but I shall go one at a time so i can focus on what I'm not doing right one step at a time.
Title: Re: learning commands
Post by: PlasmoidThunder on June 07, 2019, 12:07:13 am
Do you have a var(1)? It won't activate if var(1) isn't non-zero.
Title: Re: learning commands
Post by: eishiba on June 07, 2019, 01:15:21 am
I don't believe so. where specifically should I write this? does this stand for variation?
Title: Re: learning commands
Post by: PlasmoidThunder on June 07, 2019, 02:34:57 am
No, it's a variable. As I said above, Kung Fu Man uses var(1) as part of its combo condition code, which gives the variable a value of 1 when certain conditions are met and a value of 0 when they're not; it exists so as to avoid having to write out the same triggers for every attack.

Replace
Code:
trigger1 = var(1)
with
Code:
trigger1 = statetype != A
trigger1 = ctrl
and it should work.

You can always borrow Kung Fu Man's combo condition code and rework it to fit your needs later on, but for now let's just focus on getting that attack working.
Title: Re: learning commands
Post by: eishiba on June 07, 2019, 07:15:39 am
So my command currently says
[State -1, dash light charge]
type = ChangeState
value = 300
triggerall = command = "FF_y"
trigger1 = var(1)

Under special motions I have
[command]
name = "FF_y"
command = ~F, F, y

It still doesnt work. Do I need to have more than one sprite for the animation? Noob question I know.
Title: Re: learning commands
Post by: PlasmoidThunder on June 07, 2019, 12:46:06 pm
Please read what I said again.
Title: Re: learning commands
Post by: eishiba on June 07, 2019, 04:12:08 pm
I'm sorry. Last night after work my brain thought everything below your first paragraph was part of your signature, or whatever you want to call it. Now it says
[State -1, dash light charge]
type = ChangeState
value = 300
triggerall = command = "FF_y"
trigger1 = Statetype != A
trigger1= ctrl
So now when I do this, usually while dashing and I push any of the six buttons the character stops dashing forward and does whatever the standard standing button. But when I push F, F, Y it doesnt do any attack. But the other five buttons work. If I stand still and tap Y it does the attack its supposed to. If I dash and tap Y a little later so as not to try to prefer the dashing charge, the standard standing attack is done. I'm trying not to make this confusing. lol. Also, what does ! mean? I reread KFMs commands but never read what it means. It only has ~ / $ <+.
Title: Re: learning commands
Post by: PlasmoidThunder on June 07, 2019, 05:15:37 pm
! is the inequality operator, or to put it simply, it means not. So Statetype != A means the character's statetype does not equal A (air), so the move can only be used if the character is on the ground.

If by inputting the move correctly the character does nothing, then that means something is happening, if that makes sense. When running the character in MUGEN, press Ctrl+D to enable the debug mode and then attempt to perform the move; with any luck, the debug text at the top of the screen should inform you what's happening if something is wrong, but if not, pay attention to the text at the bottom of the screen to see whether or not the character is actually entering state 300.
Title: Re: learning commands
Post by: eishiba on June 07, 2019, 11:13:32 pm
in the states the move type is air. should I change this to standing?
Title: Re: learning commands
Post by: PlasmoidThunder on June 08, 2019, 12:18:40 am
Ideally yes, but it likely won't fix the issue. It's possible that the reason nothing appears to be happening is because the character is going into the state and then immediately landing; you'd be able to confirm this by looking at the debug text and seeing a state change from 300 to 52. This is fixed by changing state 300's physics from A to S.

To explain that further, if a state has a physics value of A (air), they will automatically enter the landing state once they've reached the ground; because your character is already on the ground when they enter state 300, they immediately go to the landing state (52).

So in short, change the move's statetype and physics to S.
Title: Re: learning commands
Post by: eishiba on June 10, 2019, 07:07:22 pm
So it seems that the character was doing the dash animation and then doing the animation for landing, even though it didnt jump. It never went into the 300 state. I changed the physics to S and now it goes into State number 300 but the action id is 200. When I try the move it does the X light punch attack. What is the action id supposed to be? Also is there a way to make this go in slow motion when I'm doing the debug?

Ha, so this is an edit. In the states I had animation 200  written instead of 300. Now the attack works.
Title: Re: learning commands
Post by: eishiba on June 11, 2019, 01:33:27 am
So my projectile attack also doesnt work. The animation itself is group 400 and has two indexs. The projectile itself is group 500 and has two indexs.

[Statedef 400]
type = S
movetype = A
physics = S
juggle = 4
poweradd = 30
ctrl = 0
velset = 0, 0
anim = 400
sprpriority = 1

[State 0, Projectile]
type = Projectile
trigger1 = animelem = 2
ProjID = 400
projanim = 500
projhitanim = 1
projscale = 1,1
projremove = 0
projremovetime = -2
projhits = 1
projpriority = 4
projsprpriority = 3
offset = 0,0
postype = p1         ;p2,front,back,left,right
; HitDef
attr = S,NP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = hard
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 50,0
pausetime = 0,4
guard.pausetime = 0,0
sparkno = 0
guard.sparkno = 0
sparkxy = 0,0
hitsound = 0,0
guardsound = 0,0
ground.type = Low     ;Low,Trip,None
air.type = Low
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -4,-3
;guard.velocity = 0
;air.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 0
hitonce = 1
;envshake.time = 0,0
;envshake.freq = 0
;envshake.ampl = 0
;envshake.phase = 0

[State 400, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1



In the commands I have it as this.

[Command]
name = "QCF_y"
command = ~D, DF, F, y

[State -1, Projectile]   
type = ChangeState
value = 400
trigger1 = command = "QCF_y"
trigger1 = Statetype != A
trigger1 = ctrl
Title: Re: learning commands
Post by: PlasmoidThunder on June 11, 2019, 12:31:36 pm
Doesn't work as in the character doesn't even enter state 400, or they do but the projectile itself doesn't appear?
Title: Re: learning commands
Post by: eishiba on June 11, 2019, 05:34:32 pm
It doesnt enter state 400 at all.
Title: Re: learning commands
Post by: PlasmoidThunder on June 12, 2019, 06:08:44 pm
Simply going off what you've shown, is the ChangeState for the projectile above the others? Does the command itself have a time value?
Title: Re: learning commands
Post by: eishiba on June 13, 2019, 01:07:09 am
Ah. That worked. How do you make the projectile kill itself when it hits the opponent?
Title: Re: learning commands
Post by: PlasmoidThunder on June 13, 2019, 02:22:09 am
The projremove parameter in the Projectile sctrl, which you've currently set to 0.
Title: Re: learning commands
Post by: eishiba on June 13, 2019, 05:28:38 pm
For the projremanim, is this what I use for whatever the animation I choose for the projectile to destroy itself?
Title: Re: learning commands
Post by: PlasmoidThunder on June 13, 2019, 05:38:08 pm
It's the anim you want your projectile to use when it's destroyed, yes.
Title: Re: learning commands
Post by: eishiba on June 13, 2019, 05:54:32 pm
I made an animation for it and have state 510. But the animation itself doesnt play but the projectile does vanish.

Also, I'm thinking about making a laser beam. Ill try to explain this and hopefully get the point across. Would it better to have less spites in the animation as it gets closer to the opponent and play the animation slower so its blockable? Or have more sprites in the animation and but play the animation faster otherwise it would give the opponent an extremely long time to prepare for a block. Which might you suggest?