collapse

Author Topic: Help on charging code.  (Read 1055 times)

0 Members and 1 Guest are viewing this topic.

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Help on charging code.
« on: September 11, 2007, 10:04:43 PM »
im trying to make a charging animation for my wip, i have the previous movements for the charge, and the charge animations
can some one help me?



Offline Error Macro

  • Never finishes anything
  • MUGEN Content Architect
  • *****
  • Posts: 1861
  • Country: United States us
  • Last Login:May 30, 2022, 05:37:56 AM
    • :)
    • Email
Re: Help on charging code.
« Reply #1 on: September 11, 2007, 10:06:02 PM »
Charge? You mean like CVS, and DBZ characters building up energy in the power bar?

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #2 on: September 11, 2007, 10:08:04 PM »
Charge? You mean like CVS, and DBZ characters building up energy in the power bar?
yes .. help?

Offline Error Macro

  • Never finishes anything
  • MUGEN Content Architect
  • *****
  • Posts: 1861
  • Country: United States us
  • Last Login:May 30, 2022, 05:37:56 AM
    • :)
    • Email
Re: Help on charging code.
« Reply #3 on: September 11, 2007, 10:13:04 PM »
I think I know how to do this.

Make a state with a

[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelem = (the first frame of his charging anim)
value = 4
;ignorehitpause =
;persistent =

Just off top of my head, try it and tell me how it works.

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #4 on: September 11, 2007, 10:14:11 PM »
I think I know how to do this.

Make a state with a

[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelem = (the first frame of his charging anim)
value = 4
;ignorehitpause =
;persistent =

Just off top of my head, try it and tell me how it works.
and then what?
cuz i already had that..

Offline Error Macro

  • Never finishes anything
  • MUGEN Content Architect
  • *****
  • Posts: 1861
  • Country: United States us
  • Last Login:May 30, 2022, 05:37:56 AM
    • :)
    • Email
Re: Help on charging code.
« Reply #5 on: September 11, 2007, 10:20:52 PM »
Really? Just add it to the state and try using it. :|

Also for CvS the charge command is Y+B (MP+MK)

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #6 on: September 11, 2007, 10:24:35 PM »
man you really need work on your helping skill.. no offense..
ok now im doing all over from scratch. now tell me

where do i begin in my cns.

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #7 on: September 11, 2007, 10:30:52 PM »
[StateDef 678]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 678
poweradd = 20

[State 1050, PowerAdd]
type = PowerAdd
trigger1 = AnimElem =  1
value = 4
;ignorehitpause =
;persistent =

thats what i have so far..

Offline Error Macro

  • Never finishes anything
  • MUGEN Content Architect
  • *****
  • Posts: 1861
  • Country: United States us
  • Last Login:May 30, 2022, 05:37:56 AM
    • :)
    • Email
Re: Help on charging code.
« Reply #8 on: September 11, 2007, 10:46:09 PM »
Modified version of P.o.t.s charge code.

Ok then, add this ANYWHERE in the cns, just not under Statedef -2, or -3.

[Statedef 740]
type=S
physics=S
movetype=I
anim= number of charging anim.
ctrl=0
velset=0,0

[State 740, power]
type=poweradd
triggerall=anim= *your anim* &&power<powermax
trigger1=var(??)<=0&&(command="holdb"&&command="holdy")
trigger2=var(??)>=1
value=2+(time/10)

[State 740, shake]
type=envshake
trigger1=anim=740&&!(time%4)
time=4
freq=80
ampl=2

[State 740, flash]
type=palfx
trigger1=anim=740&&!(time%12)
add=80,20,0
sinadd=80,20,0,12
time=12

[State 740, anim]
type=changeanim
triggerall=anim=*Your anim*&&animelemtime(2)>=0
trigger1=var(??)<=0&&(command!="holdb"||command!="holdy")
trigger2=power>=powermax||roundstate!=2
trigger3=var(??)>=1&&(inguarddist||p2movetype=A||p2dist x<160)
value=741

[State 740, end]
type=changestate
trigger1=anim=741&&!animtime
value=0
ctrl=1

Make var (??) any free var number that you may have.

Ok then after adding that, add this to your cmd.

[Command]
name="holda"
command=/a
time=1

[Command]
name="holdb"
command=/b
time=1

[Command]
name="holdc"
command=/c
time=1

[Command]
name="holdx"
command=/x
time=1

[Command]
name="holdy"
command=/y
time=1

[Command]
name="holdz"
command=/z
time=1

Now add this under statedef -1 in the cmd

[State -1, powercharge]
type=changestate
value=740
triggerall= var(??)>=1
trigger1= roundstate=2 && statetype!=A
trigger1= (power < const(data.power) && power < powermax) && !var(qwerty)
trigger1= ctrl
trigger1= !inguarddist && p2bodydist x>=160 && random<100

Make var (qwerty) any free var number you have.

(hopefully I explained this easily.)

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #9 on: September 12, 2007, 03:45:46 PM »
Modified version of P.o.t.s charge code.

Ok then, add this ANYWHERE in the cns, just not under Statedef -2, or -3.

[Statedef 740]
type=S
physics=S
movetype=I
anim= number of charging anim.
ctrl=0
velset=0,0

[State 740, power]
type=poweradd
triggerall=anim= *your anim* &&power<powermax
trigger1=var(??)<=0&&(command="holdb"&&command="holdy")
trigger2=var(??)>=1
value=2+(time/10)

[State 740, shake]
type=envshake
trigger1=anim=740&&!(time%4)
time=4
freq=80
ampl=2

[State 740, flash]
type=palfx
trigger1=anim=740&&!(time%12)
add=80,20,0
sinadd=80,20,0,12
time=12

[State 740, anim]
type=changeanim
triggerall=anim=*Your anim*&&animelemtime(2)>=0
trigger1=var(??)<=0&&(command!="holdb"||command!="holdy")
trigger2=power>=powermax||roundstate!=2
trigger3=var(??)>=1&&(inguarddist||p2movetype=A||p2dist x<160)
value=741

[State 740, end]
type=changestate
trigger1=anim=741&&!animtime
value=0
ctrl=1

Make var (??) any free var number that you may have.

Ok then after adding that, add this to your cmd.

[Command]
name="holda"
command=/a
time=1

[Command]
name="holdb"
command=/b
time=1

[Command]
name="holdc"
command=/c
time=1

[Command]
name="holdx"
command=/x
time=1

[Command]
name="holdy"
command=/y
time=1

[Command]
name="holdz"
command=/z
time=1

Now add this under statedef -1 in the cmd

[State -1, powercharge]
type=changestate
value=740
triggerall= var(??)>=1
trigger1= roundstate=2 && statetype!=A
trigger1= (power < const(data.power) && power < powermax) && !var(qwerty)
trigger1= ctrl
trigger1= !inguarddist && p2bodydist x>=160 && random<100

Make var (qwerty) any free var number you have.

(hopefully I explained this easily.)
omg.. no that did not help
like i said.. i need help in coding this.. not to rip a code from another type of character
now like i said be4
help me code it from scratch.. no more coding from other characters ok?

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #10 on: September 12, 2007, 06:59:04 PM »
.....

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Help on charging code.
« Reply #11 on: September 12, 2007, 07:30:26 PM »
I'm just going to tell you what to do and you have ti code it, first create the statedef, and then put a poweradd, and the you put in the trigger1 = time >= 0 ; these means than as soon as you start the anim , then the value, is the number of energy that you will increase, and then make the changestate and thats it


sig made by shullbocka

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #12 on: September 12, 2007, 07:38:19 PM »
ok, thanks fall i can always rely on you
ok this is what i have so far
[Statedef 654]
type    = S
movetype= S
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
anim = 654
sprpriority = 2
trigger1 = time >= 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =   AnimElem = 1
value = 1011
;elem = 1
;ignorehitpause =
;persistent =

654= animation before charging
1011= charging animation.

is it good so far?

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Help on charging code.
« Reply #13 on: September 12, 2007, 07:55:24 PM »
ok, thanks fall i can always rely on you
ok this is what i have so far
[Statedef 654]
type    = S
movetype= S
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
anim = 654
sprpriority = 2
trigger1 = time >= 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =   AnimElem = 1
value = 1011
;elem = 1
;ignorehitpause =
;persistent =

654= animation before charging
1011= charging animation.

is it good so far?
No, because you put a trigger in the statedef, and not in a state, and  I would have make it in 2 differents state, like these

[Statedef 654]
type    = S
movetype= S
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
anim = 654
sprpriority = 2


[State 0, Change]
type = Changestate
trigger1 =   Animtime = 0
value = 655
ctrl = 0

[Statedef 655]
type    = S
movetype= S
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
anim = 1011
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time >= 0
value = 100

[State 0, Change]
type = Changestate
trigger1 =   Animtime = 0
value = 0
ctrl = 1


sig made by shullbocka

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #14 on: September 12, 2007, 08:06:37 PM »
ok i tried this error came up:
state movetype *s* is not valid

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #15 on: September 12, 2007, 08:08:07 PM »
klolol ok i got it again
now like i said be4, how can i make it so when i let go of the button config, he stops?
« Last Edit: September 12, 2007, 08:13:58 PM by dshiznetz_is_back »

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #16 on: September 12, 2007, 08:40:40 PM »
still there angel? anyone?

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Help on charging code.
« Reply #17 on: September 12, 2007, 10:11:33 PM »
sorry for not answering earlyer
To male that happens you need to put these in the changestate, I'asumming that the commands thar you are using is holdy and holdb

[State xxxx, x]
type = ChangeState
trigger1 = command != "holdy" && command != "holdb"
value = 0
ctrl = 1

these means that the character is going to change the state when you are not pressing y and b



sig made by shullbocka

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #18 on: September 12, 2007, 10:22:10 PM »
not really i had it.. the cmd code for it was a,c lol
will that effect it?

or do i have to change it to * y+b*?

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Help on charging code.
« Reply #19 on: September 12, 2007, 10:33:26 PM »
not really i had it.. the cmd code for it was a,c lol
will that effect it?

or do i have to change it to * y+b*?

if you are using a,c, make sure than in the cmd you have these

[Command]
name = "holdc"
command = /$c
time = 1

[Command]
name = "holda"
command = /$c
time = 1

and in the changestate change these

trigger1 = command != "holdc" && command != "holda"


sig made by shullbocka

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #20 on: September 12, 2007, 10:41:29 PM »
not really i had it.. the cmd code for it was a,c lol
will that effect it?

or do i have to change it to * y+b*?

if you are using a,c, make sure than in the cmd you have these

[Command]
name = "holdc"
command = /$c
time = 1

[Command]
name = "holda"
command = /$c
time = 1

and in the changestate change these

trigger1 = command != "holdc" && command != "holda"

still wont work.. this is what i have.

charge
[Statedef 654]
type    = s
movetype= A
physics = s
juggle  = 4
poweradd= 10
ctrl = 0
anim = 654
sprpriority = 2


[State 0, Change]
type = Changestate
trigger1 = command != "holdc" && command != "holda"
value = 655
ctrl = 0


[Statedef 655]
type    = s
movetype= A
physics = s
juggle  = 4
poweradd= 10
ctrl = 0
anim = 1011
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time >= 0
value = 10


cmd.
[command]
name = "charging"
command = a+c
time = 15

;charging
[State -1, charging]
type = ChangeState
value = 654
triggerall = command = "charging"
trigger1 = (statetype = s) && ctrl




Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Help on charging code.
« Reply #21 on: September 12, 2007, 10:47:56 PM »
You have to change the  first changestate, and you have to add one in the secnd one, remembre you always have to have a changestate

these is the first change state
State 0, Change]
type = Changestate
trigger1 = animtime = 0
value = 655
ctrl = 0

these is the second changestate
[State 0, Change]
type = Changestate
trigger1 = command != "holdc" && command != "holda"
value = 0
ctrl = 1


sig made by shullbocka

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #22 on: September 12, 2007, 10:52:14 PM »
ok i put it in, now he does it.. but doesnt want to stop 0_o

[Statedef 654]
type    = s
movetype= A
physics = s
juggle  = 4
poweradd= 10
ctrl = 0
anim = 654
sprpriority = 2


[State 0, Change]
type = Changestate
trigger1 = animtime = 0
value = 655
ctrl = 0

[State 0, Change]
type = Changestate
trigger1 = command != "holdc" && command != "holda"
value = 0
ctrl = 1

[Statedef 655]
type    = s
movetype= A
physics = s
juggle  = 4
poweradd= 10
ctrl = 0
anim = 1011
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time >= 0
value = 10

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Help on charging code.
« Reply #23 on: September 12, 2007, 10:54:41 PM »
thet happened because you didnt puy the changestate in the second statedef, try these
[Statedef 654]
type    = s
movetype= A
physics = s
juggle  = 4
poweradd= 10
ctrl = 0
anim = 654
sprpriority = 2


[State 0, Change]
type = Changestate
trigger1 = animtime = 0
value = 655
ctrl = 0



[Statedef 655]
type    = s
movetype= A
physics = s
juggle  = 4
poweradd= 10
ctrl = 0
anim = 1011
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time >= 0
value = 10

[State 0, Change]
type = Changestate
trigger1 = command != "holdc" && command != "holda"
value = 0
ctrl = 1


sig made by shullbocka

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Help on charging code.
« Reply #24 on: September 12, 2007, 11:05:59 PM »
omfg

i love you dude it works great!!

thanks alot dude.

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

Classic VS : Athena by ELECTRO
[May 10, 2024, 02:44:09 PM]


Ballroom Hallway (1.1 Only/AIGS) by Vegaz by LightFlare
[May 09, 2024, 11:53:48 AM]


Neon Light Force Demo by kyoman
[May 08, 2024, 12:50:05 PM]


D2TD VS Showcase Thread by D2TD
[May 05, 2024, 10:08:50 AM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[April 21, 2024, 12:09:20 PM]


Ultimate E. Honda + stage by ELECTRO
[April 18, 2024, 09:47:24 PM]


Sunset Beach (1.1 Only/AIGS) by Vegaz by LightFlare
[April 16, 2024, 06:55:00 PM]


Wonder Twins 2.0 by brucewayne74, Shining and Skhsato123 by brucewayne74
[April 05, 2024, 06:07:48 PM]


X-Men Training Room (Bright & Dark) Stage 1.1 & 1.0 by MatreroG
[April 05, 2024, 10:55:29 AM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[April 01, 2024, 11:03:03 PM]

* IMT Calendar

May 2024
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 [11]
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

SimplePortal 2.3.5 © 2008-2012, SimplePortal