YesNoOk
avatar

Level Up! (Read 486 times)

Started by ShunpoHadouken, February 09, 2009, 03:48:52 am
Share this topic:
Level Up!
#1  February 09, 2009, 03:48:52 am
  • **
Im trying to figure out how to display a explod everytime your power bar increase each level...
[mcode][State -2] ;level 1
type       = VarSet
triggerall = Var(1) = 0
trigger1   = power = [1000,1999]
v         = 1
value      = 1 ;the explod "level 1" appear when Var(1) is 1

[State -2] ;this will stop the explod from appearing when explod's animtime is over
type     = VarSet
trigger1 = Var(1) = 1
v       = 1
value    = 1

[State -2];this will reset the explod to 0 when power is lower than 1000
type       = VarSet
triggerall = Var(1) = 1
trigger1   = power <= 999
v         = 1
value      = 0

[State -2] ;level 2
type       = VarSet
triggerall = Var(2) = 0
trigger1   = power = [2000,2999]
v         = 2
value      = 1

[State -2]
type     = VarSet
trigger1 = Var(2) = 1
v       = 2
value    = 1

[State -2]
type       = VarSet
triggerall = Var(3) = 1
trigger1   = power <= 1999
v         = 3
value      = 0

[State -2] ;level 3
type       = VarSet
triggerall = Var(3) = 0
trigger1   = power = [3000,3999]
v         = 3
value      = 1

[State -2]
type     = VarSet
trigger1 = Var(3) = 1
v       = 3
value    = 1

[State -2]
type       = VarSet
triggerall = Var(3) = 1
trigger1   = power <= 2999
v         = 3
value      = 0[/mcode]
I have try setting Var everytime my power increase but the problem is...it also occurs when my power decrease...
It happens like this:
When my power increase by two level there will be explod that appear that says "Level 2"...
But when I use 1 level...there is also explod appear says "Level 1"...
How do I prevent this from happening...
Thanks For Any Help!!!
Re: Level Up!
#2  February 09, 2009, 07:14:19 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Well, reading that, var(1) is always 1, unless power drops below 1000, so each time the explod is triggered, var(1) is still 1 if it's gone up. Give it a 3rd value for "has been used" like 2.

Personally i'd have done it with a helper that changes state based on power and plays an explod then changes state to the next one up. Removes variables, and the way state -2 is checked each tick can be annoying for a once in a while effect.


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: Level Up!
#3  February 09, 2009, 10:29:13 am
  • **
Using a helper is probably the safest method.

You can also do it in state -2 using just two controllers. You need one var that is set to your power lvl -> floor(power/1000).
BEFORE you set the var, check if it is BELOW your actual power lvl. If it is you create the explod.
You should use then XXXX+powerlvl for your explods anims.
Latest Creation: SSBB Assist Trophies
Re: Level Up!
#4  February 09, 2009, 01:58:44 pm
  • **
My doing is very bad.

Using a helper is probably the safest method.

You can also do it in state -2 using just two controllers. You need one var that is set to your power lvl -> floor(power/1000).
BEFORE you set the var, check if it is BELOW your actual power lvl. If it is you create the explod.
You should use then XXXX+powerlvl for your explods anims.
Anyway I have try what you said,and it works fine.
But is there a way that the explod will just appear when your power increase.Like:1000 increase to 2000.
Not in 2000 decrease to 1000.
Thanks.
Thanks For Any Help!!!
Re: Level Up!
#5  February 09, 2009, 05:15:54 pm
  • **
Thats why I said you should only create the explod if the var is lower than your actual power level.
Latest Creation: SSBB Assist Trophies
Re: Level Up!
#6  February 09, 2009, 05:30:08 pm
  • ******
  • [E]
    • Mexico

  • Online
if you are using the helper changestate method just add another set of sprites like:

state1 power = 0-999

state2 power = 1000-1999 make explod go to state3 instantly

state3 power = 1000-1999

state4 power = 2000-2999 make explod go to state5 instantly

state5 power = 2000-2999

then make the "going backwards" change states skip the even states.