News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Custom state issue

Started by Xinos, August 05, 2010, 07:06:42 PM

Previous topic - Next topic

Xinos

Okay, heres what's happening at the moment. I'm currently having an issue with my characters attack, that sends the opponent into a custom state.



As you can see, this works perfectly fine...if the opponent is the same character as mine, if the opponent isn't Yungmie (My Yungmie to be exact), the burning animation is no longer there, making the opponent invisible.

I'm not quite sure what's happening here. Here's the code in a spoiler:

Spoiler (click to show)
;---------------------------------------------------------------------------
; Fire Kick
[Statedef 1201]
type    = S
movetype= A
physics = N
juggle  = 1
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1200
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 11
value = 2, 2

[State 240, 2]
type = HitDef
trigger1 = animelem = 5
trigger2 = animelem = 11
attr = S, NA
animtype  = Medium
damage    = 89
hitflag = MA
guardflag = MA
pausetime = 13,13
sparkno = S7050
guard.sparkno = S7025
sparkxy = -10,-95
hitsound   = S1,3
guardsound = S1,6
ground.type = Low
ground.hittime  = 21
ground.slidetime = 21
guard.ctrltime = 16
ground.velocity = -11.2
air.hittime = 80
air.fall.recover = 0
air.velocity = -3,-8.5
id = 240
p2facing = 1
p2stateno = 1250

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

[State 0, VelSet]
type = VelSet
trigger1 = command = "holdfwd"
x = .3
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = command = "holdback"
x = -.3
y = 0

[State -2, Increaser]
type = varadd
trigger1 = command = "a" ^^ command = "b"
var(3) = 1

[State -2, Decreaser]
type = varadd
trigger1 = time %10 = 0
var(3) = -1

[State -2, Limiter]
type = varadd
trigger1 = var(3) > 2
var(3) = -1

[State 240, 4]
type = ChangeState
trigger1 = var(3) < -1
trigger1 = animelem = 12
value = 1202
ctrl = 1

;---------------------------------------------------------------------------
; Fire Kick End
[Statedef 1202]
type    = S
movetype= A
physics = N
juggle  = 1
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1201
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 5
value = 2, 2

[State 240, 4]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------
;Initial Burning State
[Statedef 1250]
type = A
movetype= H
physics = N
poweradd = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 300, 4]
type = ChangeAnim2
trigger1 = Time = 0
value = 9999

[State 0, PosFreeze]
type = PosFreeze
trigger1 = time < 13
value = 1

[State 822, State End]
type = changeState
trigger1 = time = 13
value = 1251

;----------------------------------------------------------------------
;Initial Burning State (Go into the air)
[Statedef 1251]
type = A
movetype= H
physics = N
poweradd = 0
velset = 0,0
ctrl = 0
sprpriority = 0

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

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .28

[State 822, State End]
type = SelfState
triggerall = Vel Y > 0
trigger1 = Pos Y >= 10
value = 5100

I'm also using Mugen 1.0 RC8 if that helps. Thanks.

Ricepigeon

Is anim 9999 using the required sprites? If it isnt then you should modify it to use those sprites instead, otherwise the character in the custom state will appear invisible if those sprites are missing in his SFF file (even though the anim data is in P1's data, it still uses P2's sprites).

If you still want a burning effect, use the PalFX sctrl to achieve those results.

Xinos

I see, in that case, i'll go with that PalFX suggestion.

Thanks for the help.

2OS

#3
Alternate [ actual ] solution — Make the state invisible and use an explod of your burn anim, have the explod bind indefinitely and remove itself when the state(s) ends



;Initial Burning State
[Statedef 1250]
type = A
movetype= H
physics = N
poweradd = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 2OS]
type=assertspecial
trigger1=1
flag=invisible
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State 2OS]
type=changeanim
trigger1=1
value=5050
ignorehitpause=1


[State 0, PosFreeze]
type = PosFreeze
trigger1 = time < 13
value = 1

[State 822, State End]
type = changeState
trigger1 = time = 13
value = 1251

;----------------------------------------------------------------------
;Initial Burning State (Go into the air)
[Statedef 1251]
type = A
movetype= H
physics = N
poweradd = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 2OS]
type=assertspecial
trigger1=1
flag=invisible
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999


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

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .28

[State 2OS]
type=removeexplod
triggerall=vel y>0
trigger1=pos y>=10
id=9999
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999


[State 822, State End]
type = SelfState
triggerall = Vel y > 0
trigger1 = Pos Y >= 10
value=5100
ignorehitpause=1


[Statedef -2]

[State 2OS]
type=explod
trigger1=p2stateno=1250&&numexplod(9999)=0
pos=0,0
postype=p2
sprpriority=9
anim=9999
id=9999
bindtime=-1
ownpal=1
scale=const(size.xscale),const(size.yscale)
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999



Overall you should notice absolutely zero difference, other than the burn anim actually works universally for any opponent, lol

EDIT:
Quote from: RicePigeon on August 05, 2010, 07:39:56 PM
(even though the anim data is in P1's data, it still uses P2's sprites).
Do keep this in mind from now on tho cos it's dead on balls accurate

Dcat


Xinos

Thanks a lot 2OS, that worked wonders :)