YesNoOk
avatar

change state isn't working? (Read 420 times)

Started by Judas1, October 16, 2010, 01:36:59 am
Share this topic:
change state isn't working?
#1  October 16, 2010, 01:36:59 am
  • avatar
  • **
im coding a move, and part of it the character is supposed to float up.  the state change works at first, but as soon as the vel set happens it does not finish the rest of the animation, and the character just falls down. heres a video of what happens and the code.
 
http://www.youtube.com/watch?v=NtspS7CyHUM

[Statedef 940]
type = S
ctrl = 0
anim = 920
velset = 0,0
sprpriority = -1




[State 940, Žc‘œ]
type = Afterimage
trigger1 =  Time = 0
PalContrast =  200, 150, 30
palbright = 30,30,0  ;(ÔA—΁AÂ)–¾‚邳
palmul = .80,.80,.80
paladd = -10,-10,-10
trans = Add
time = -1
TimeGap  = 2
FrameGap = 2
length = 10



[State -1, ‰¹‚ð–‚炷]
type = PlaySnd
trigger1 = AnimElem = 16
value = 100, 1
volume = -100

[State -1, ‰¹‚ð–‚炷]
type = PlaySnd
trigger1 = AnimElem = 16
value = 6, 5
volume = -100





[State 940, ƒwƒ‹ƒp[¢Š«];–‚•ûw
type = Helper
trigger1 = time = 0
ID = 21001
pos = 0, 10
postype = p1
facing = 1
stateno = 21001
size.xscale  = 0.70
size.yscale  = 0.34




[State 940, ‰¹‚ð–‚炷]
type = PlaySnd
Trigger1 = time = 0
value = 60, 10
freqmul = 2.5
volume = -200


[State 940, ‰¹‚ð–‚炷]
type = PlaySnd
Trigger1 = time = 0
value = 50, 4


[State 940, ‰¹‚ð–‚炷]
type = PlaySnd
Trigger1 = time = 0
value = 60, 2







[State 940, ˆÚ“®]
type = VelSet
Trigger1 = animelem = 1
y= -8

sorry if this is confusing i just started doing this, and there is more code in other states for the move, im not sure if it is needed to help me though -_-.
Re: change state isn't working?
#2  October 16, 2010, 02:27:06 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You don't have a changestate. You haven't applied physics either. I really don't see what that state is supposed to achieve now. You give it a movetype and physics so it behaves the way you want. And when it's done everything you use changestate to leave the state.

It's leaving it automatically right now so either what you did at the end of that vid was a basic jump, or physics = A is kicking in and causing you to drop again.

You sure you're sending them to 940 and haven't made a typo and sent her to 40 instead?


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: change state isn't working?
#3  October 16, 2010, 02:33:20 am
  • avatar
  • **
well i know there isn't a change state in that, in the code previously i used a  changestate to go to 940, i just didn't know how to describe this problem. i dont see any errors or anything in the code, for some reason she just falls down and goes into a different animation when shes supposed to continue going up. im sure they go to 940 as well because it starts but just stops for some reason.
Re: change state isn't working?
#4  October 16, 2010, 02:45:50 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Set the physics to N. Make absolutely sure it's going to 940. Use debug to confirm it IS 940 (ctrl+D) and then try agian.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: change state isn't working?
#5  October 16, 2010, 03:17:45 am
  • avatar
  • **
i set physics to N but it is still not working. I checked in debug like you said, and its going to state 940 but then instantly changing to state 50.  this is the changestate code i used in the previous state . i dont know why it isnt working, it might be code from another state but im not sure if thats even possible?

[State 690, Changestate]
type = changestate
trigger1 = animtime = 0
value = 940
ctrl = 0
Re: change state isn't working?
#6  October 16, 2010, 03:48:47 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You may have 2 state 940's. Do you get ANY of the effects you've put in that state? You should get at least 2 playsnd's. If they're not happening, you're not going to the right state 940, see if there is another one (probably physics = A as well.)


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: change state isn't working?
#7  October 16, 2010, 03:57:21 am
  • avatar
  • **
it plays the sound and shows a  helper from the state 940. there isn't another state named 940 either, but i borrowed the code from an intro of the character where the state is 930. i just changed the name of the state to 940.
Re: change state isn't working?
#8  October 16, 2010, 04:50:27 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I feel like there is something you're not showing me in that case. Repaste the whole state from the [statedef] line to the NEXT [statedef] line.

Give me the code in the .cmd as well that puts you in this state. If this is in fact another link in a string of states, paste the whole move, you can leave out the helper states though.

After that i should be able to tell you where you're going wrong.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: change state isn't working?
#9  October 16, 2010, 05:29:13 am
  • avatar
  • **
attack part of the move

[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 1
poweradd= 0
ctrl = 0
velset = 0,0
anim = 800
sprpriority = 2



[State 800, 2]
type = HitDef
trigger1 = Animelem = 5
attr = S, NT
damage = 0, 0
animtype = High
guardflag =
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 17
hitsound = s60, 14
guardsound = s2, 4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,0
airguard.velocity = 0,0
air.type = High
air.velocity = 0,0
air.hittime = 14
getpower = 70,50
envshake.time = 10
envshake.freq = 70
envshake.ampl = 3
envshake.phase = 80
p1sprpriority = 2
p2sprpriority = 1
p1stateno = 690
p2stateno = 4018
ID = 9
hitonce = 0


[State 800, 3]
type = Varset
Trigger1  = animelem = 6
FV = 33
Value = 0





[State -1, 0]
type = AfterImage
trigger1 = Time = 0
trans = add1
TimeGap  = 1
FrameGap = 2;3
time = 29
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =  1,1,1;.9, .9, .9
length = 20

[State 800, ˆÚ“®]
type = VelSet
Trigger1 = AnimElem = 5
x = 6



[State 800, 7]
type = changestate
trigger1 = animtime = 0
ctrl = 1
value = 0

part after the move hits

[StateDef 690];’´‡H•_”eŽa@¬Œ÷
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 690
sprpriority = 2





[State 690, EnvColor]
type = Envcolor
time = 11
trigger1 = time = 21


[State 690, ’I?n??‘??e?I?E’u?P];TargetBind?A‘??e?d?e??“I?E?S‘c
type = TargetBind
trigger1 =  time = 21
pos = 30,(pos Y=0)-90



[State 910, ?k“R];?O?? ?h?e
type = envshake
trigger1 = time = 2
time = 45
freq = 100
ampl = 15
phase = 100


[State 690, Changestate]
type = changestate
trigger1 = animtime = 0
value = 940
ctrl = 0

part where she is supposed to go in the air

[Statedef 940]
type = S
ctrl = 0
anim = 920
velset = 0,0
physics = N
sprpriority = -1




[State 940, Žc‘œ]
type = Afterimage
trigger1 =  Time = 0
PalContrast =  200, 150, 30
palbright = 30,30,0  ;(ÔA—΁AÂ)–¾‚邳
palmul = .80,.80,.80
paladd = -10,-10,-10
trans = Add
time = -1
TimeGap  = 2
FrameGap = 2
length = 10


[State 940, ˆÚ“®]
type = VelSet
Trigger1 = animelem = 1
y= -8

custom state that opponent gets put into after move contact

[Statedef 4018]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 0



[State 4018, ƒwƒ‹ƒp[Á–Å]
type = DestroySelf
TriggerAll = palno  = 12
triggerall =  isHelper
trigger1 = 1


[State 4018, ‘ŠŽè‚̃Aƒjƒ•ύX]
type = ChangeAnim2
trigger1 = Time = 0
value = 4015


[State 4018, ‰æ–ʌŒè]
type = screenbound
trigger1 = 1
value = 1
movecamera = 320




[State -1, –³“G]
type = NotHitBy
trigger1 = 1
value = , NA,SA,HA,NP,SP,HP,NT,ST,HT


[State 4013, ˆÚ“®]
type = posset
trigger1 = time = 21
y = -90

[State 4013, ˆÚ“®]
type = posset
trigger1 = time = 1
y = -50



[State 4014,]
type = LifeSet
TriggerAll = EnemyNear,palno  = 12
Trigger1 = time > 200
value = 1
absolute = 1



[State -1, ‘ŠŽèƒXƒe[ƒg‚É–ß‚·]
type = SelfState
trigger1 = time > 600
value = 5210


i can't find anything in the cmd, when i search the value /anim nothing shows up and its all in japanese.

Re: change state isn't working?
#10  October 16, 2010, 05:36:26 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Recreate state 940 and relabel it [statedef 83745] please, i wish to know what happens then.

Based on your code, the character should continue going upwards forever.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: change state isn't working?
#11  October 16, 2010, 05:42:59 am
  • avatar
  • **
same thing happens i renamed all of it to what u said. dont know why its doing this -_-
Re: change state isn't working?
#12  October 16, 2010, 06:06:09 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Rewriting state 940 for you. Tell me what happens

[mcode][statedef 940]
type = A
physics = N
movetype = I
ctrl = 0
anim = 920
velset = 0,0

[state velset]
type = velset
trigger1 = animelemtime(1) = 0
y = -8

[state changestate]
type = changestate
trigger1 = time = 240
value = 50
ctrl = 0[/mcode]

I have left out your afterimage code, feel free to add it back.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: change state isn't working?
#13  October 16, 2010, 06:17:20 am
  • avatar
  • **
it worked perfect thx