YesNoOk
avatar

Power Charge Problems [Solved] (Read 223 times)

Started by KBN22, August 22, 2010, 01:18:43 am
Share this topic:
Power Charge Problems [Solved]
New #1  August 22, 2010, 01:18:43 am
  • ***
  • Heroin-flavored bananas finance revolutions!!!
I'm having a bit of trouble with my power charge, it works fine,the FX appear in front of my char when I'm on the ground, but when I jump and hit the power charge commands before I hit the ground, this happens:

Spoiler, click to toggle visibilty

Here's the code:

Code:
;====================== POWER CHARGE ==========================
[Statedef 197]
type    = S
physics = S
movetype= I
anim = 197
ctrl = 0
velset = 0,0


[State 197, flash]
type = palfx
trigger1 = 1
time = 1
add =70+ceil(sin(time/8.0*pi)*70),20+ceil(sin(time/8.0*pi)*20),0

[State 197, 3]
type = PlaySnd
trigger1 = Time = 0
value = 0, 2
channel = 0

[State 197, Snd]
type=playsnd
trigger1= anim=196 && power>=powermax
value=1+(var(1)=2)*1,1-(var(1)=2)
channel=0
persistent=0

[State 197, power]
type=poweradd
triggerall= anim=197 && power<powermax
trigger1= var(59)<=0 && (command="chargec" && command="chargez")
trigger2= var(59)>=1
value=2+ifelse(time<60,0,(time-60)/10)

[State 197, Anim]
type=changeanim
triggerall= anim!=196
trigger1= var(59)<=0 && (command!="chargec" || Command != "chargez")
trigger2= power>=const(data.power) || power>=powermax || roundstate!=2
trigger3= var(59)>=1 && (inguarddist || p2movetype=A || p2dist x<160)
value=196

[State 197, Voice]
type = Stopsnd
trigger1 = Anim = 196
channel = 1
persistent = 0

[State 197, Super]
type = Helper
trigger1 = !NumHelper(8780)
trigger1 = Time = 1
id = 8780
name = "Chargefx"
pos = 0,0
postype = P1
stateno = 8780
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 197, ctrlset]
type = ctrlset
triggerall = !ctrl
trigger1 = anim = 196
value = 1

[State 197, StateChange]
type = ChangeState
trigger1 = Anim = 196 && AnimTime = 0
value = 0
ctrl = 1

;====================== POWER CHARGE FX ==========================
[Statedef 8780]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8780
velset = 0,0
sprpriority = 2

[State 8780, BindToParent]
type = BindToParent
trigger1 = 1
pos = -5,2;-7,2

[State -2,AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State -2, 1]
type = Trans
trigger1 = 1
trans = add

[State 8780, Super]
type = Helper
trigger1 = !NumHelper(8781)
;trigger1 = root,power <=2900
id = 8781
name = "Charge"
pos = 0,0
postype = P1
stateno = 8781
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 8780, Voice]
type = Playsnd
trigger1 = Time = 0
value = 4000,8
channel = 16

[State -2, scale]
type = AngleDraw
trigger1 = root,power<3000
scale= .5, .3 + .3*(root,power/3000.0)

[State -2, scale]
type = AngleDraw
trigger1 = root,power>=3000
scale= .5, .5

[State 8780, EnvShake]
type = EnvShake
trigger1 = power < 1000
trigger1 = (gametime%4) =1
time = 3
ampl = -2

[State 8780, EnvShake]
type = EnvShake
trigger1 = power = [1001,2000]
trigger1 = (gametime%4) =1
time = 3
ampl = -3

[State 8780, EnvShake]
type = EnvShake
trigger1 = power > 2000
trigger1 = (gametime%4) =1
time = 3
ampl = -4

[State 8780, Voice]
type = Stopsnd
trigger1 = Root,StateNo != 197
trigger2 = Root,Anim != 197
channel = 16

[State 8780, RemoveExplod]
type = RemoveExplod
trigger1 = Root,StateNo != 197

[State 8780, DestroySelf]
type = destroyself
trigger1 = Root,StateNo != 197
trigger1 = root,movetype = h

[State 8780, DestroySelf]
type = changestate
trigger1 = Root,anim = 196
value = 8782

[State 8780, DestroySelf]
type = changestate
trigger1 = Root,anim = [1300,1320]
value = 8782

;-----------CHARGE FX 2-------------
[Statedef 8781]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8781
velset = 0,0
sprpriority = -1

[State 8781, BindToParent]
type = BindToroot
trigger1 = 1
pos = -5,2;-7,2

[State -2,AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State -2, 1]
type = Trans
trigger1 = 1
trans = add

[State 8781, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = .45,.4;.1+(time*.022),.07+(time*.02);0+(time*.04),.0+(time*.008)

[State 8781, DestroySelf]
type = DestroySelf
trigger1 = Root,StateNo != 197
;trigger2 = time >=11
Last Edit: August 22, 2010, 02:37:56 am by kibanaruto22
Re: Power Charge Problems
#2  August 22, 2010, 02:02:30 am
  • **
  • Progress: ongoing
    • USA
WHERE YOU HAD:
Code:
;-----------CHARGE FX 2-------------
[Statedef 8781]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8781
velset = 0,0
sprpriority = -1

YOU SHOULD HAVE HAD:
Code:
;-----------CHARGE FX 2-------------
[Statedef 8781]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8781
velset = 0,0
sprpriority = 2

In the last line there, sprpriority should be 2

Spoiler, click to toggle visibilty
Re: Power Charge Problems
#3  August 22, 2010, 02:31:47 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I don't think that's it. For one, he has 2 bits of FX, the circle and the flare. The -1 is on the circle, the 2 is on the flare.

Give your character himself a sprpriority = 1, that should fix it. He's probably inheriting from the last state.


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: Power Charge Problems
#4  August 22, 2010, 02:37:41 am
  • ***
  • Heroin-flavored bananas finance revolutions!!!
Sho nuff'  :sugoi:

That did the trick.I knew it had to be something simple. You never cease to amaze me, Thanks again