Anim pause/loop need help fix

Started by Zennousha, April 09, 2008, 12:46:24 AM

Previous topic - Next topic

Zennousha

Im trying to make my character gain attack power and lose defence after his power reaches
max but he keeps freezing and the sound starts skipping jus as he goes into state 999 and there
are no invalid states in the debug menu.

(This is what i got if it is wrong a what and why explanation would help me correct it in future)

Thanks

[State -2, Boost]
type = ChangeState
trigger1 = power >= 5000
value = 999
ctrl = 0
anim = 999


[Statedef 999, Boost]
type = S
movetype= A
physics = S
anim = 999
ctrl = 0

[State 999, AttackMulSet]
type = AttackMulSet
trigger1 = animelem = 8
value = 1.5

[State 999, DefenceMulSet]
type = DefenceMulSet
trigger1 = animelem = 8
value = -1.5

[State 999, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S7,7
volume = 100
channel = 1
freqmul = 1.0
loop = 0
pan = 0

[State 999, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S4,6
volume = 100
channel = 0
freqmul = .5
loop = 0
pan = 0

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

Cyanide

He's doing what you've told him to.

Quote[State -2, Boost]
type = ChangeState
trigger1 = power >= 5000
value = 999
ctrl = 0
anim = 999

That means. Go to state 999 while power is >= 5000 There are no other requirements, it will just keep entering the state.

You should probably have a variable that is set to 1 in that state and 0 while power < 5000. Then set your triggers so you cannot enter that state while var is 1 and power >= 5000.


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.

Zennousha

 That explains the loop  ;P

so to stop this i do this

type = VarSet
trigger1 = ???
v = (1)
value = 1

In state 999

and change trigger in -2 state to

trigger 1 = power >= 5000 && var(1) = 0
????
Is that how i do it??
Sorry i don't have a clear understanding of var  >.<

Zennousha

#3
I got it

Thanks Cy your a legend

Quick Qs

How do i reset the variable after a certain amout of game time?
So that the att boost stays in effect for certain amount of game time or would i set another variable for them?
Also i tried to lower my defence with defmulset but it doesn't seem to work is it possible to lower defence?


Cyanide

We can cheat a little and make use of your current variable for that and just change the triggers a little.

Rather than = 1, it's now > 0 instead which will encompass 1 and everything above it.

State -2 is checked every tick, there are 60 ticks in a second. 600 in 10 seconds etc. To set something up with a timer you decrease a variable. If you set the var to 600 then use a varadd in state -2 to decrease it, it will reach 0 and turn everything off after 10 seconds. You want it to last longer, increase the value of the variable, less time, decrease it.


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.

Zennousha

Thanks for the lessons
im gonna mess around for a couple a days and see what else i can do with var and stuff

Peace