supporter-captain

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Change State question  (Read 526 times)

Offline aa250

  • CC Staff
  • *
  • Posts: 6750
  • Country: 00
  • retired
  • Referrals: 0
Change State question
« on: September 23, 2009, 01:42:34 AM »
My question is how do I make a character change from one to animation to another. I was successful with the Shield hyper I made him laugh after he did it


What I am trying to do is when he does that in move in the air


I want him to fly down after he is done laughing the animation number is 1335 this is the code I messed with
;---------------------------------------------------------------------------
;Magnetic Shield
[Statedef 4121]
type    = U
movetype= A
physics = N
juggle  = 2
;poweradd=
velset = 0,0
;anim = 4121
ctrl = 0
sprpriority = 2
facep2 = 1


[State 4121]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 4121]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 4121]
type = null;ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0


[State 4121]
type = null;AssertSpecial
trigger1 = 1
flag = nobg
flag1 = nofg

[State 4121]
type = null;Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1



[State 4121]
type = Varset
trigger1 = Time = 0
var(57) = 1

[State 4121]
type = Helper
trigger1 = Time = 0
stateno = 24120
id = 24120
ownpal = 1


[State 4121]
type = PalFx
trigger1 = Time = [1,20]
time = 8
add = 64,32,64
sinadd = 64,32,64,30


[State 4121]
type = PlaySnd
trigger1 = AnimElem = 7
value = 4120,0

[State 4121]
type = ChangeState
trigger1 = Time = 65
value = 195
ctrl = 1

The value 195 is the state where he laughs.

Offline zvitor

  • M.U.G.E.N Contributor
  • ****
  • Posts: 1194
  • Country: 00
  • Referrals: 1
Re: Change State question
« Reply #1 on: September 23, 2009, 03:51:37 AM »
its can works, but u are in wrong way....
u cant control him in that state because he changed to 195, so lets continue in wrong way to make its works, go to statedef 195 and change his changeste
[State 195](is that right?)
type = ChangeState
trigger1 = Time = 60
value = 0
ctrl = 1
to:
[State 195]
type = ChangeState
trigger1 = Time = 60
value = ifelse((prevstateno=4121),52,0)
ctrl = 1

« Last Edit: September 23, 2009, 03:57:02 AM by zvitor »

Offline zvitor

  • M.U.G.E.N Contributor
  • ****
  • Posts: 1194
  • Country: 00
  • Referrals: 1
Re: Change State question
« Reply #2 on: September 23, 2009, 03:54:18 AM »
note:
kong' code have lots of null states like this:
[State 4121]
type = null;ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
...
u can remove this lines to make code more clean.
« Last Edit: September 23, 2009, 03:56:38 AM by zvitor »

Offline aa250

  • CC Staff
  • *
  • Posts: 6750
  • Country: 00
  • retired
  • Referrals: 0
Re: Change State question
« Reply #3 on: September 23, 2009, 10:54:02 AM »
Actually I don't want to control him when he laughing what I am trying to do is after he done laughing I want to fly down the changestate for the fly down animation is 1335, but I only want that to happened when he performs the shield hyper in the air. Not on ground. I do have plans to remove the null code, but not until I fixed everything.

Offline YD

  • ******
  • Posts: 3085
  • Country: 00
  • Referrals: 0
Re: Change State question
« Reply #4 on: September 23, 2009, 11:01:52 AM »
Actually I don't want to control him when he laughing what I am trying to do is after he done laughing I want to fly down the changestate for the fly down animation is 1335, but I only want that to happened when he performs the shield hyper in the air. Not on ground. I do have plans to remove the null code, but not until I fixed everything.

I would say to then either alter the taunt code (195) if you not using it as a taunt to make a change to state 1335.

Offline aa250

  • CC Staff
  • *
  • Posts: 6750
  • Country: 00
  • retired
  • Referrals: 0
Re: Change State question
« Reply #5 on: September 23, 2009, 01:42:27 PM »
Actually I don't want to control him when he laughing what I am trying to do is after he done laughing I want to fly down the changestate for the fly down animation is 1335, but I only want that to happened when he performs the shield hyper in the air. Not on ground. I do have plans to remove the null code, but not until I fixed everything.

I would say to then either alter the taunt code (195) if you not using it as a taunt to make a change to state 1335.

,but isn't there a way to make him jump from one animation to another. That what I am trying to do, but only in the air.

Offline YD

  • ******
  • Posts: 3085
  • Country: 00
  • Referrals: 0
Re: Change State question
« Reply #6 on: September 23, 2009, 02:29:51 PM »
Actually I don't want to control him when he laughing what I am trying to do is after he done laughing I want to fly down the changestate for the fly down animation is 1335, but I only want that to happened when he performs the shield hyper in the air. Not on ground. I do have plans to remove the null code, but not until I fixed everything.

I would say to then either alter the taunt code (195) if you not using it as a taunt to make a change to state 1335.

,but isn't there a way to make him jump from one animation to another. That what I am trying to do, but only in the air.

I am no coding genius as Zvitor, so maybe he can explain a little more on how to accomplish that, all I can offer is to check and try things on the version I DL'd but he is the acclaimed king of code so maybe knows how to achieve that for you.

Offline aa250

  • CC Staff
  • *
  • Posts: 6750
  • Country: 00
  • retired
  • Referrals: 0
Re: Change State question
« Reply #7 on: September 24, 2009, 01:12:23 AM »
Oh no it okay I appreciate everything you guys have done. I'm starting to understand this whole coding stuff.

Offline zvitor

  • M.U.G.E.N Contributor
  • ****
  • Posts: 1194
  • Country: 00
  • Referrals: 1
Re: Change State question
« Reply #8 on: September 24, 2009, 04:59:35 AM »
Actually I don't want to control him when he laughing what I am trying to do is after he done laughing I want to fly down the changestate for the fly down animation is 1335, but I only want that to happened when he performs the shield hyper in the air. Not on ground. I do have plans to remove the null code, but not until I fixed everything.
then try:
[State 195]
type = ChangeState
trigger1 = Time = 60
value = ifelse((prevstateno=4121),1335,0)
ctrl = 1