YesNoOk
avatar

learning commands (Read 27290 times)

Started by eishiba, June 05, 2019, 01:31:32 am
Share this topic:
learning commands
#1  June 05, 2019, 01:31:32 am
  • avatar
  • **
    • USA
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.
Re: learning commands
#2  June 05, 2019, 01:54:23 am
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
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.

Oh, I want a diagram. I fucking love diagrams.
Re: learning commands
#3  June 05, 2019, 05:45:34 pm
  • avatar
  • **
    • USA
Re: learning commands
#4  June 05, 2019, 08:58:24 pm
  • *
  • "The Ultimate Reploid"
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.
Re: learning commands
#5  June 05, 2019, 11:13:45 pm
  • avatar
  • **
    • USA
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"
Re: learning commands
#6  June 06, 2019, 02:37:44 am
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
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.

Oh, I want a diagram. I fucking love diagrams.
Last Edit: June 06, 2019, 02:40:50 am by PlasmoidThunder
Re: learning commands
#7  June 06, 2019, 03:40:08 am
  • avatar
  • **
    • USA
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
Re: learning commands
#8  June 06, 2019, 04:40:42 am
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
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.

Oh, I want a diagram. I fucking love diagrams.
Re: learning commands
#9  June 06, 2019, 07:34:01 pm
  • avatar
  • **
    • USA
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.
Re: learning commands
#10  June 07, 2019, 12:07:13 am
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
Do you have a var(1)? It won't activate if var(1) isn't non-zero.

Oh, I want a diagram. I fucking love diagrams.
Re: learning commands
#11  June 07, 2019, 01:15:21 am
  • avatar
  • **
    • USA
I don't believe so. where specifically should I write this? does this stand for variation?
Re: learning commands
#12  June 07, 2019, 02:34:57 am
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
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.

Oh, I want a diagram. I fucking love diagrams.
Re: learning commands
#13  June 07, 2019, 07:15:39 am
  • avatar
  • **
    • USA
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.
Re: learning commands
#14  June 07, 2019, 12:46:06 pm
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
Please read what I said again.

Oh, I want a diagram. I fucking love diagrams.
Re: learning commands
#15  June 07, 2019, 04:12:08 pm
  • avatar
  • **
    • USA
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 ~ / $ <+.
Re: learning commands
#16  June 07, 2019, 05:15:37 pm
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
! 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.

Oh, I want a diagram. I fucking love diagrams.
Re: learning commands
#17  June 07, 2019, 11:13:32 pm
  • avatar
  • **
    • USA
in the states the move type is air. should I change this to standing?
Re: learning commands
#18  June 08, 2019, 12:18:40 am
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
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.

Oh, I want a diagram. I fucking love diagrams.
Re: learning commands
#19  June 10, 2019, 07:07:22 pm
  • avatar
  • **
    • USA
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.
Last Edit: June 10, 2019, 07:17:58 pm by eishiba
Re: learning commands
#20  June 11, 2019, 01:33:27 am
  • avatar
  • **
    • USA
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