YesNoOk
avatar

States problem (Read 360 times)

Started by NecusX, February 19, 2020, 10:27:55 AM
Share this topic:
States problem
#1  February 19, 2020, 10:27:55 AM
  • avatar
  • **
  • BOOM!
  • I'm a magen dade who knows how to code somewhat
    • USA
I've fixed plenty of problems in jins characters but for this one I'm having a hard time with. one of kyos supers where he does a combo leading to his orochinagi sends people to a custom state, so I managed to get it so that in his grab gets the opponent to their grab state, but when he gets to his combo, the opponent goes to their falling state for some unknown reason, although there is nowhere in the custom states where it has the state of 5100, any suggestions will be appreciated.

Here is the code:

Code for the attack itself:

[Statedef 3010]
type     = S
movetype = A
physics  = S
juggle   = 0
velset   = 0,0
anim     = 3010
ctrl     = 0
sprpriority = 5

[State 170, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA

[State 0, TargetState]
type = TargetState
trigger1 = Numtarget && !time
trigger2 = animelem = 1
trigger3 = animelem = 2
trigger4 = animelem = 3
value = 870


[State 2000]
type = AssertSpecial
trigger1 = 1
flag = NoFG
flag2 = NOBG
ignorehitpause = 1

[State 2100,]
type = Envcolor
trigger1 = AnimElem = 3
time = 1
value = 255,255,255
under = 0

[State 2000,]
type = PlaySnd
trigger1 = AnimElem = 1
value = s1,5

[State 2000,]
type = PlaySnd
trigger1 = AnimElem = 3
value = s12,5

[State 2000,]
type = PlaySnd
trigger1 = AnimElem = 12
trigger2 = AnimElem = 19
trigger3 = AnimElem = 29
trigger4 = AnimElem = 36
trigger5 = AnimElem = 41
trigger6 = AnimElem = 49
trigger7 = AnimElem = 60
value = s0,4

[State 2000,]
type = PlaySnd
trigger1 = AnimElem = 56
value = s3,0

[State 810, 1]
type = TargetBind
trigger1 = AnimElemtime(1) >= 0 && AnimElemtime(55) < 0
pos = 45,0

[State 210, 物理的なキャラの幅]
type = Width
trigger1 = AnimElemTime (4) >= 0 && AnimElemTime (7) <= 0
trigger2 = AnimElemTime (22) >= 0 && AnimElemTime (24) <= 0
edge = 50,0

[State 210, 物理的なキャラの幅]
type = Width
trigger1 = AnimElemTime (7) >= 0 && AnimElemTime (15) <= 0
trigger2 = AnimElemTime (24) >= 0 && AnimElemTime (32) <= 0
trigger3 = AnimElemTime (39) >= 0 && AnimElemTime (56) <= 0
edge = 30,0

[State 210, 物理的なキャラの幅]
type = Width
trigger1 = AnimElemTime (15) >= 0 && AnimElemTime (17) <= 0
edge = 25,0

[State 1000, 軸位置移動]
type = Posadd
trigger1 = AnimElem = 52 | AnimElem = 53
x = 5

[State 1000, 軸位置移動]
type = Posadd
trigger1 = AnimElem = 4 | AnimElem = 7 | AnimElem = 8 | AnimElem = 9
trigger2 = AnimElem = 11 | AnimElem = 13 | AnimElem = 14 | AnimElem = 15
trigger3 = AnimElem = 16 | AnimElem = 17 | AnimElem = 18 | AnimElem = 19
trigger4 = AnimElem = 24 | AnimElem = 25 | AnimElem = 26 | AnimElem = 28
trigger5 = AnimElem = 30 | AnimElem = 31 | AnimElem = 32 | AnimElem = 33
trigger6 = AnimElem = 34 | AnimElem = 35 | AnimElem = 36 | AnimElem = 40
trigger7 = AnimElem = 42 | AnimElem = 43 | AnimElem = 45 | AnimElem = 46
trigger8 = AnimElem = 47 | AnimElem = 48 | AnimElem = 55
x = 5;10

[State 1000, 軸位置移動]
type = Posadd
trigger1 = AnimElem = 5 | AnimElem = 6
trigger2 = AnimElem = 22 | AnimElem = 23
x = 15

[State 1000, 軸位置移動]
type = Posadd
trigger1 = AnimElem = 12
trigger2 = AnimElem = 29
x = 20

[State 1000, 軸位置移動]
type = Velset
trigger1 = AnimElemtime(55) >= 3
x = 2.6

[State 1000, 軸位置移動]
type = Velset
trigger1 = AnimElem = 56
y = -3.7

[State 1000, 軸位置移動]
type = VelAdd
trigger1 = AnimElemtime(56) > 0
x = -.07
y = .3

[State 6000, 3]
type = StateTypeSet
trigger1 = AnimElem = 56
statetype = A

[State 1100, エフェクト表示]
type = Explod
trigger1 = AnimElem = 1
persistent = 0
anim = 4040
postype = P1
pos = 40,-75
sprpriority = 10
ignorehitpause = 1

[State 1100, エフェクト表示]
type = Explod
trigger1 = AnimElem = 3
persistent = 0
anim = 1430
postype = P1
pos = 50,-65
sprpriority = 10
ignorehitpause = 1

[State 1100, エフェクト表示]
type = Explod
trigger1 = AnimElem = 14
persistent = 0
anim = 1605
postype = P1
pos = 55,-65
sprpriority = 10
ignorehitpause = 1

[State 1100, エフェクト表示]
type = Explod
trigger1 = AnimElem = 31
persistent = 0
anim = 1605
postype = P1
pos = 55,-65
sprpriority = 10
ignorehitpause = 1

[State 1100, エフェクト表示]
type = Explod
trigger1 = AnimElem = 20
persistent = 0
anim = 1605
postype = P1
pos = 70,-60
sprpriority = 10
ignorehitpause = 1

[State 1100, エフェクト表示]
type = Explod
trigger1 = AnimElem = 37
persistent = 0
anim = 1605
postype = P1
pos = 70,-60
sprpriority = 10
ignorehitpause = 1

[State 1100, エフェクト表示]
type = Explod
trigger1 = AnimElem = 43
persistent = 0
anim = 1615
postype = P1
pos = 55,-60
sprpriority = 10
ignorehitpause = 1

[State 1100, エフェクト表示]
type = Explod
trigger1 = AnimElem = 49
persistent = 0
anim = 1315
postype = P1
pos = 60,-80
sprpriority = 10
ignorehitpause = 1

[State 200, ヒット定義]
type = HitDef
trigger1 = AnimElem = 3
attr = S, HA
getpower = 0
damage = 80,0
animtype = Hard
hitflag = MAF
priority = 3, Hit
pausetime = 5,10
sparkno = -1
hitsound = -1
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = 0
p2stateno = 3030
palfx.time = 40
palfx.add = 30,-40,-140
palfx.sinadd = 60,60,50,10
palfx.color = 0
palfx.invertall = 1
kill = 0
numhits = 0

[State 200, ヒット定義]
type = HitDef
trigger1 = AnimElem = 14
attr = S, HA
getpower = 0
damage = 30,0
animtype = Hard
hitflag = MAF
priority = 3, Hit
pausetime = 3,10
sparkno = S30002
guard.sparkno = s30040
sparkxy = -25,-65
hitsound = s1,1
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = 0
p2stateno = 3030
palfx.time = 40
palfx.add = 30,-40,-140
palfx.sinadd = 60,60,50,10
palfx.color = 0
palfx.invertall = 1
kill = 0

[State 200, ヒット定義]
type = HitDef
trigger1 = AnimElem = 20
attr = S, HA
getpower = 0
damage = 30,0
animtype = Hard
hitflag = MAF
priority = 3, Hit
pausetime = 3,10
sparkno = S30002
guard.sparkno = s30040
sparkxy = -25,-70
hitsound = s1,1
ground.type = Low
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = 0
p2stateno = 3040
palfx.time = 40
palfx.add = 30,-40,-140
palfx.sinadd = 60,60,50,10
palfx.color = 0
palfx.invertall = 1
kill = 0

[State 200, ヒット定義]
type = HitDef
trigger1 = AnimElem = 31
attr = S, HA
getpower = 0
damage = 30,0
animtype = Hard
hitflag = MAF
priority = 3, Hit
pausetime = 3,10
sparkno = S30002
guard.sparkno = s30040
sparkxy = -25,-65
hitsound = s1,1
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = 0
p2stateno = 3030
palfx.time = 40
palfx.add = 30,-40,-140
palfx.sinadd = 60,60,50,10
palfx.color = 0
palfx.invertall = 1
kill = 0

[State 200, ヒット定義]
type = HitDef
trigger1 = AnimElem = 37
attr = S, HA
getpower = 0
damage = 30,0
animtype = Hard
hitflag = MAF
priority = 3, Hit
pausetime = 3,10
sparkno = S30002
guard.sparkno = s30040
sparkxy = -25,-70
hitsound = s1,1
ground.type = Low
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = 0
p2stateno = 3040
palfx.time = 40
palfx.add = 30,-40,-140
palfx.sinadd = 60,60,50,10
palfx.color = 0
palfx.invertall = 1
kill = 0

[State 200, ヒット定義]
type = HitDef
trigger1 = AnimElem = 43
attr = S, HA
getpower = 0
damage = 30,0
animtype = Hard
hitflag = MAF
priority = 3, Hit
pausetime = 3,10
sparkno = S30002
guard.sparkno = s30040
sparkxy = -25,-70
hitsound = s1,1
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = 0
p2stateno = 3030
palfx.time = 40
palfx.add = 30,-40,-140
palfx.sinadd = 60,60,50,10
palfx.color = 0
palfx.invertall = 1
kill = 0

[State 200, ヒット定義]
type = HitDef
trigger1 = AnimElem = 51
attr = S, HA
getpower = 0
damage = 30,0
animtype = Hard
hitflag = MAF
priority = 3, Hit
pausetime = 3,10
sparkno = S30002
guard.sparkno = s30040
sparkxy = -25,-60
hitsound = s1,1
ground.type = Low
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = 0
p2stateno = 3040
palfx.time = 40
palfx.add = 30,-40,-140
palfx.sinadd = 60,60,50,10
palfx.color = 0
palfx.invertall = 1
kill = 0

[State 200, ヒット定義]
type = HitDef
trigger1 = AnimElem = 56
attr = A, HA
getpower = 0
damage = 30,0
animtype = Hard
hitflag = MAF
priority = 3, Hit
pausetime = 10,11
sparkno = S30002
guard.sparkno = s30040
sparkxy = -25,-70
hitsound = s1,3
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
p2stateno = 3035
palfx.time = 40
palfx.add = 30,-40,-140
palfx.sinadd = 60,60,50,10
palfx.color = 0
palfx.invertall = 1
kill = 0

[State 200, ヒット定義]
type = HitDef
trigger1 = AnimElem = 60
attr = A, HA
getpower = 0
damage = 30,0
animtype = up
hitflag = MAF
priority = 3, Hit
pausetime = 11,11
sparkno = S30002
guard.sparkno = s30040
sparkxy = -25,-60
hitsound = s1,3
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -3,-9.4
air.velocity = -3,-9.4
yaccel = .36
fall = 1
fall.recover = 0
palfx.time = 60
palfx.add = 30,-40,-140
palfx.sinadd = 60,60,50,10
palfx.color = 0
palfx.invertall = 1
kill = 0

[State 1000, 音を鳴らす]
type = PlaySnd
trigger1 = Movehit = 1
value = s12,8

[State 1000, ステート変更]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 3015


All of the custom states that the attack goes to:

[Statedef 3020]
type    = S
movetype= H
physics = S
velset = 0,0

[State 52, 1]
type = Hitfallset
trigger1 = 1
value = 0

[State 52, 1]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3040



[State 1830]
type = SelfState
trigger1 = Enemy,Stateno != 870
value = 870

[State 1830]
type = SelfState
trigger1 = Animtime = 0
value = 0
ctrl = 1



[Statedef 3030]
type    = S
movetype= H
physics = S
velset = 0,0

[State 52, 1]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 2030

[State 1830]
type = SelfState
trigger1 = time > 15 && p2Stateno != [2000,3999]
value = 5015

[State 1830]
type = SelfState
trigger1 = Animtime = 0
value = 0
ctrl = 1



[Statedef 3035]
type    = S
movetype= H
physics = S
velset = 0,0

[State 52, 1]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 2030

[State 1830]
type = SelfState
trigger1 = time > 15 && p2Stateno != [2000,3999]
value = 5015

[State 1830]
type = SelfState
trigger1 = Animtime = 0
value = 0
ctrl = 1



[Statedef 3040]
type    = S
movetype= H
physics = S
velset = 0,0

[State 52, 1]
type = Hitfallset
trigger1 = 1
value = 0

[State 52, 1]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3030

[State 1830]
type = SelfState
trigger1 = p2Stateno != 5015
value = 5015

[State 1830]
type = SelfState
trigger1 = Animtime = 0
value = 0
ctrl = 1
That will happen to you if you don't wear your seat belts, so make sure to wear your seat belts.
Re: States problem
#2  February 21, 2020, 08:14:49 AM
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
3035 and 3030 are the only ones that might retain the state. The rest selfstate when p1 won't be in the state hes in. Without knowing how long anim 2030 is. He can drop out of that too.

I mean 3010 puts him into state 870. But one of those custom states checks if enemy is in 870. And if not he selfstates out. Enemy will never be in 870. 870 is for p2. 3010 is p1.

Whatever was being aimed for here is busted. Without knowing what the custom states are for i can't guve you a better option other than letting you know there is some very shit code happening here.


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: States problem
#3  February 27, 2020, 12:36:29 AM
  • avatar
  • **
  • BOOM!
  • I'm a magen dade who knows how to code somewhat
    • USA
3035 and 3030 are the only ones that might retain the state. The rest selfstate when p1 won't be in the state hes in. Without knowing how long anim 2030 is. He can drop out of that too.

I mean 3010 puts him into state 870. But one of those custom states checks if enemy is in 870. And if not he selfstates out. Enemy will never be in 870. 870 is for p2. 3010 is p1.

Whatever was being aimed for here is busted. Without knowing what the custom states are for i can't guve you a better option other than letting you know there is some very shit code happening here.

Fixed It myself, thank you for the advice although you could've put the last one in less harsher terms.
That will happen to you if you don't wear your seat belts, so make sure to wear your seat belts.
Re: States problem
#4  February 27, 2020, 08:52:01 AM
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net

  • Online
The code was shitty.

See this?
Quote
[State 1830]
type = SelfState
trigger1 = Enemy,Stateno != 870
value = 870
This only works on a full game. Here P2 will revert to his own state 870. If P2 has no such state (and odds is that he won't), it breaks the game. How's that for shitty coding?
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!