YesNoOk
avatar

help with coding a punch (Read 1042 times)

Started by kingofsouls, April 13, 2009, 06:23:14 pm
Share this topic:
help with coding a punch
#1  April 13, 2009, 06:23:14 pm
  • avatar
  • *
Re: help with coding a punch
#2  April 13, 2009, 06:25:33 pm
  • ******
  • [E]
    • Mexico

  • Online
you don't know what yua re doing wrong, but you should know what happens wrong, post that.
Re: help with coding a punch
#3  April 13, 2009, 06:30:14 pm
  • avatar
  • *
oh yea..eheh my bad.

the problem is that when i try to punch, there is no punch.
Re: help with coding a punch
#4  April 13, 2009, 07:11:10 pm
  • **
if you mean that the char doesnt make the animation of the punch...check that you are using the correct animation in your statedef......if the punch doesnt make contact with the opponent make sure that you have add the red clsn, and you are using a hitdef, that trigger correctly
Re: help with coding a punch
#5  April 13, 2009, 07:14:13 pm
  • avatar
  • *
The character dosen't throw the punch (as in it jsut dosne't do it. download him and see for yourself if you would like to see.)
Re: help with coding a punch
#6  April 13, 2009, 07:17:39 pm
  • ******
No, we're not going to download your files to fix it for you. You have to learn how to fix these things by yourself, because this is something very basic, if you can't do it, you won't do anything. For that, you must know the kind of things you should check for when you have this or that problem.

So, what does happen when you hit the button ? Did you put the command definition properly ? Did you put the changestate with proper triggers in the proper part of the .cmd file (somewhere after the line that says "statedef -1") ? Do you have an animation for the punch ? Is the state you send your character to properly uses that animation ? Do you have a proper changestate at the end of your punch state, is it not sending you back to state 0 too early ?
Also turn on the debug mode (ctrl+D) it can tell yo useful stuff, such as missing animation, invalid redirection etc.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: April 13, 2009, 07:27:22 pm by Byakko
Re: help with coding a punch
#7  April 13, 2009, 07:19:34 pm
  • avatar
  • *
Uh..i posted teh file so you could follow along, just in case i lose you with my inaccurate descriptions.


So..when i hit the button, it does absolutly nothin. I don''t really understand what any of this mean, and when I read a description about it in this thing called
"narutorial", i got even more lost.
Last Edit: April 13, 2009, 07:26:20 pm by kingofsouls
Re: help with coding a punch
#8  April 13, 2009, 07:26:33 pm
  • ******
Did you somehow fail to read the entirety of my post ? I asked you questions, check them one by one in the order they are. I actually did download your file and figured out your problem, but you have to learn to do it yourself. If you don't get what a specific question means, ask.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: help with coding a punch
#9  April 13, 2009, 07:34:55 pm
  • avatar
  • *
i have no idea what any of this means.
Re: help with coding a punch
#10  April 13, 2009, 07:46:57 pm
  • ******
Open the damn files.
Did you put the command definition properly ?
Did you put the changestate with proper triggers in the proper part of the .cmd file (somewhere after the line that says "statedef -1") ?
Do you have an animation for the punch ?
Is the state you send your character to properly uses that animation ?
Do you have a proper changestate at the end of your punch state, is it not sending you back to state 0 too early ?
Also turn on the debug mode (ctrl+D while in a fight) it can tell yo useful stuff, such as missing animation, invalid redirection etc.

Seriously. READ THESE LINES ONE BY ONE.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: help with coding a punch
#11  April 13, 2009, 07:47:19 pm
  • avatar
  • *
okay, they are opened.

EDIT: i think i put in the command definition properly, but i am not sure, seinghow i don't know how to properly put in a command definition properly.
Last Edit: April 13, 2009, 07:51:12 pm by kingofsouls
Re: help with coding a punch
#12  April 13, 2009, 07:50:41 pm
  • ******
Look at the .cmd. Where did you define "x" ? Where did you define what should happen when you press "x" ?

Also, the docs, read them.


Quote
i don't know how to properly put in a command definition properly.
Can you read ?
Quote
; The CMD file.
;
; Two parts: 1. Command definition and  2. State entry
; (state entry is after the commands def section)
;
; 1. Command definition
; ---------------------
; Note: The commands are CASE-SENSITIVE, and so are the command names.
; The eight directions are:
;   B, DB, D, DF, F, UF, U, UB     (all CAPS)
;   corresponding to back, down-back, down, downforward, etc.
; The six buttons are:
;   a, b, c, x, y, z               (all lower case)
;   In default key config, abc are are the bottom, and xyz are on the
;   top row. For 2 button characters, we recommend you use a and b.
;   For 6 button characters, use abc for kicks and xyz for punches.
;
; Each [Command] section defines a command that you can use for
; state entry, as well as in the CNS file.
; The command section should look like:
;
;   [Command]
;   name = some_name
;   command = the_command
;   time = time (optional)
;   buffer.time = time (optional)
[...]
; Some common commands examples are given below.
;
; [Command] ;Quarter circle forward + x
; name = "QCF_x"
; command = ~D, DF, F, x
THIS CAN BE FOUND AT THE TOP OF YOUR FILE.
Why don't you actually READ it ??
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: April 13, 2009, 07:54:13 pm by Byakko
Re: help with coding a punch
#13  April 13, 2009, 07:52:55 pm
  • ****
    • www.freewebs.com/c00per619
Chapter Eight: The cruel tutelage of Pai Mei Byakko
Re: help with coding a punch
#14  April 13, 2009, 07:55:20 pm
  • avatar
  • *
this is gonna sound really stupuid, but in order to reach the cmd file, i have to use fighter factory,r ight?>
Re: help with coding a punch
#15  April 13, 2009, 07:56:10 pm
  • ******
Right click on the file -> "modify" or "open with" and chose any text editor (notepad++, wordpad etc.)
most files in Mugen are text files, you can open them that way. Mainly the .def, the .cns, the .st, the .cmd, the .air. Now the .sff and .snd are not, you can't directly open them, it's the images and the sounds.
Also please check again my previous post.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: help with coding a punch
#16  April 13, 2009, 07:56:57 pm
  • avatar
  • *
8*sign* loak, let me set somehting striaght here. I have asbergers synbrome. i'm a little different okay? i glaze over things, a skip things, and I sometimes do teh oppasite of what people tell me to do.

Now, back on topicc. I see a windows NT command sctipt, my DEF, SFF, ACT, CNS, and AIR files. So...which one is the cmd file?
Last Edit: April 13, 2009, 08:01:41 pm by kingofsouls
Re: help with coding a punch
#17  April 13, 2009, 07:58:51 pm
  • ******
.............
the cmd file
Now what would make you think that the cmd file is the cns file ? didn't you just ask about the cmd file and not the cns file ?

It's the file with a gear symbol (assuming you're on Windows).


Most files in Mugen are text files, you can open them that way. Mainly the .def, the .cns, the .st, the .cmd, the .air. Now the .sff and .snd are not, you can't directly open them, it's the images and the sounds.

Also read the docs, it tells you what file is what.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: help with coding a punch
#18  April 13, 2009, 08:02:19 pm
  • avatar
  • *
okay, i'm in th efile with the gear.
Re: help with coding a punch
#19  April 13, 2009, 08:05:07 pm
  • ******
Read what's at the top. All the lines that start with a ;.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: help with coding a punch
#20  April 13, 2009, 08:08:28 pm
  • avatar
  • *
okay...so i have to put my ligh tpunch in the command definition AND the state definition, right?
Re: help with coding a punch
#21  April 13, 2009, 08:14:46 pm
  • ******
First the block that defines your command in the command definition part.
Then, in the "state entry" part, you put the changestate - the block of code that will tell Mugen "go to this statedef when I press x under this and that other conditions".
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: help with coding a punch
#22  April 13, 2009, 08:16:20 pm
  • avatar
  • *
...you just lost me again.

in teh command area, the command of "X" is there, but i am not sure where to put the command for "light punch"
Re: help with coding a punch
#23  April 13, 2009, 08:19:36 pm
  • ******
The command for light punch is x. what yo need is the state entry that says "when I press x, if I'm standing, if I have control, then I want my character to go  to this state number which is the action for the light punch".

In the file, you have
Quote
; Two parts: 1. Command definition and  2. State entry
; (state entry is after the commands def section)
;
; 1. Command definition
; ---------------------
then, much later
Quote
;---------------------------------------------------------------------------
; 2. State entry
; --------------
; This is where you define what commands bring you to what states.
;
; Each state entry block looks like:
;   [State -1, Label]           ;Change Label to any name you want to use to
;                               ;identify the state with.
;   type = ChangeState          ;Don't change this
;   value = new_state_number
;   trigger1 = command = command_name
;   . . .  (any additional triggers)
[...]
; Don't remove the following line. It's required by the CMD standard.
[Statedef -1]
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: help with coding a punch
#24  April 13, 2009, 08:20:46 pm
  • avatar
  • *
okay, i have this for light punch:

;Light Punch
[State -1, Light Punch]
type = ChangeState
value = 200
trigger1 = command = "x"
trigger1 = statetype = S
trigger1 = 1

however, it's not working so something I typed in something wrong and I have no clue on how to fix it.
Last Edit: April 13, 2009, 08:33:15 pm by kingofsouls
Re: help with coding a punch
#25  April 13, 2009, 08:36:14 pm
  • ******
So, open the .cns file (same as the .cmd) and look for "statedef 200" (because this block of code you just copy-pasted in your post says "when I do the COMMAND "X" and I'm STANDING, then do CHANGESTATE to VALUE 200").
Also you have a problem, the last line "trigger1 = 1" should read "trigger1 = ctrl". Change it. You must have control for the move to trigger.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: April 13, 2009, 08:41:05 pm by Byakko
Re: help with coding a punch
#26  April 13, 2009, 08:54:08 pm
  • avatar
  • *
Okay, thank you for your help...but I kinda figureed out the problem (I was using fighter factory and i labeled teh lgith punch animation wrong....who knew?)

I would like to also thnak you for putting up with me and for trying ot explain thigs to me. My family lets me know every noe and again that it is frustrating to explain things to me, and they are 100% right.

Your awesome