YesNoOk
avatar

what the fic?... cns maddness... (Read 1569 times)

Started by Cornholio, September 03, 2007, 07:57:19 am
Share this topic:
what the fic?... cns maddness...
#1  September 03, 2007, 07:57:19 am
  • ****
I'm currently in the process of creating Daigo from BigBang Beat. I've never created a character before therefore I know absolutely zilch about coding. I decided to go with a template from Fighter Factory to make it easier on my part. Everything has been going swell until my attempt to sprite the forward dash.

The problem is the electabyte template only has a running forward vaule therefore he slides if it isn't coded right so I asked a buddy of mine for help. He then replied with the following message:
rouga is my first char aswell. the only reason why i did so much so fast was because it was the basic stuff taht i just read from the docs, narutorials, etc. but for the dashing code i have mine like this -

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = ChangeState
trigger1 = command != "holdfwd"
value = 0

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[State 105, 2]
type = CtrlSet
trigger1 = Time = 2
value = 1

[State 105, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106

just copy and paste that over the original run_fwd state in the common.cns. make sure you copy and past a common1.cns file into daigo's folder and edit that one and not the original.

sooo yay! i got my code all i got to do is go into my common1.cns... but wait...


what the deuce? no common.cns file and defnitely no common1.cns file...

I asked him for help once again and this is what he said:
i dont have a common.cns for my character how odd... the the only cns file i have is labeled daigo.cns...

is it too late to make one? or do i have to start over from gorund up?

mmm go into the data folder of your mugen and copy the common1.cns file into daigo's folder and in daigo's .def file use common1.cns for your stcommon =
what should i do?... I'm afraid to take any further instructions...like i said before I don't have neither common.cns or common1.cns... what do i copy or put into this new common.cns file?... oh btw this is how my def file looks from the get go...

did I do anything wrong?... I don't want to start from the ground up...

I've made quite a bit of progress... well not a lot but im happy with it so far take a gander.

yay! palettes the last 2 are devil daigo palettes... devil daigo has two more palettes I didn't feel like making them because one is all black with the exception of his eyes and mouth which is red and the other one is a gold daigo kinda like gold tetsu...

http://www.youtube.com/watch?v=cMD_CRojdRw
*smoothed out walking animation and others
*added crouch low punch and back dash

sorry i realize that this is in the wrong place can someone move it for me? i can't delete the message.
Hello guys.  I have touched children.
Re: what the fic?... cns maddness...
#2  September 03, 2007, 05:46:58 pm
  • avatar
  • *****
  • Nothing ever ends
    • Portugal
    • www.justnopoint.com/loona
States like running, walking and jumping are all pre-defined in the common.cns file so that all characters will have them by default, but you don't need to modify that file to change something in you character, you can simply redefine/override the states you want by using the same state numbers they use  in your own character's files - you can do that in your Daigo.cns file by adding the code your friend provided you with.

IIRC, back when I worked on Cell I had to tweak a few common states so they'd work the way I wanted them to, and created a separate CNS/ST file just for them to make it easier to keep track of that - if you look through enough character files you'll notice some have things like specials and supers coded in separate files - it's something you may want to consider.
Re: what the fic?... cns maddness...
#3  September 03, 2007, 08:24:14 pm
  • ****
you can do that in your Daigo.cns file by adding the code your friend provided you with.

i tried that on the backup character i had yesterday.. nothing happened.. the forward run was still sliding..... as if i didn't do anything perphaps you can post a screenn shot as to where exactly im suppose to put the code in the daigo.cns.
Hello guys.  I have touched children.
Re: what the fic?... cns maddness...
#4  September 03, 2007, 08:48:21 pm
  • avatar
  • **
  • Opensource Programmer
    • mugenrebirth.forumfree.it
Strange...
If you add your own code with a new [Statedef 100] into your own CNS file this must replace the default [Statedef 100] programmed in common1.cns (ovverride common states tecqnique).

But if your code doesn't work try to open the .DEF file of the char with notepad and watch to "st" order that must be like this:

st = cns1.cns
st1 = cns2.cns
....
stcommon = common1.cns

So the line of "stcommon" must be the last one of the "st" list
RETIRED FROM MUGEN WORLD.
All my creations (characters, stages, applications, etc) can be freely destributed and hosted anywhere without any limitation.

Developer of N.O.M.E.N. (Abandoned project).