Code Problems Power up

Started by Girku, June 18, 2009, 04:24:30 AM

Previous topic - Next topic

Girku

What am I doing wrong   ???  


For some reason unbeknowest to me the sound for when my character powers up  plays when ever I hit z despite the fact that the command to power up is z+c....And it also plays after the charge animation is over...never when it is supposed to..Somebody Help Please  ???
Heres the coding

Spoiler (click to show)

; POWER UP
[Statedef 820]
type    = S
physics = S
movetype= I
anim = 820
ctrl = 0
velset = 0,0

[State 820, Voice]
type = Playsnd
trigger1 = Anim = 820 && AnimElem = 1
value = 2,96
channel = 1

[State 820, PowerMax Sound]
type = PlaySnd
trigger1 = Power = 1000
value = 1982, 45
channel = 1
persistent = 0
VOLUME = 999

[State 820, PowerMax Sound]
type = PlaySnd
trigger1 = Power = 2000
value = 1982, 45
channel = 1
persistent = 0
VOLUME = 999


[State 820, PowerMax Sound]
type = PlaySnd
trigger1 = Power >= 3000
value = 1982, 45
channel = 1
persistent = 0
VOLUME = 999

[State 820, PowerAdd]
type = PowerAdd
trigger1 = 1 && (Command = "charge1" && Command = "charge2")
value = 4

[State 820, Anim]
type = ChangeAnim
trigger1 = (Command != "charge1" || Command != "charge2") || power >= 3000
value = 1
persistent = 0

[State 820, Voice]
type = Stopsnd
trigger1 = AnimTime = 1
channel = 0
persistent = 0

[State 820, StateChange]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1



Cyanide

Why is ctrl = 1 in that state? That's a disaster waiting to happen.

The playing noise just cos you pressed Z, this will be a changestate issue. You've probably told it z or z+c in some manner. Or your command has the issue. z,c for eg.

As for playing after it's over, dunno yet, fix what you've got and we'll work on that after.


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.

Girku

#2
so change the ctrl=1 to ctrl=0? at the begining right?
okay changed that..But now it no longer plays it when I press z..but it still plays the sound after the animation is over...