YesNoOk
avatar

freeze power value of character (infinite power) (Read 2004 times)

Started by onomamashinee, July 08, 2020, 12:23:44 am
Share this topic:
freeze power value of character (infinite power)
#1  July 08, 2020, 12:23:44 am
  • avatar
  • *
I'm trying to create a trigger where, if you press "start" with a certain character, his power will be frozen at max until the end of the round. I've managed to figure out the set to max part, but I can't figure out how to freeze the value. Any ideas on how to code this? Any help from more experienced coders would be appreciated. This is what I could come up with, as I am not very experienced with mugen at all:

[State 0, VarSet]
type = VarSet
trigger1 = command = "start"
v = 49 
value = 4
persistent = 1
ignorehitpause = 1

[State -3, infpower]
type = powerset
trigger1 = power < powermax
trigger2 = var(49) = 4
persistent = 1
value = powermax

Unfortunately it only sets power to max, but does not freeze it (giving infinite power)
Re: freeze power value of character (infinite power)
#2  July 08, 2020, 08:07:10 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Is that state -3 actually under statedef -3? Your other one is in state 0 apparently rather than cmd. I have reason to believe its in the wrong place as your triggers are wrong and would cause perma power regardless of hitting enter.


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: freeze power value of character (infinite power)
#3  July 08, 2020, 03:57:09 pm
  • avatar
  • *
Thank you for replying. Under statedef -3, the state did give me permanent infinite power, but I changed the triggers slightly and upon testing, it worked the way I intended it to. I do not know if it will work for other characters, but in case other people in the community want to do the same thing, here is what made it work for me: :)

[State 0, VarSet]
type = VarSet
trigger1 = command = "start"
v = 49
value = 4
persistent = 1
ignorehitpause = 1

[State -3, infpower]
type = powerset
trigger1 = var(49) = 4
persistent = 1
value = powermax
Re: freeze power value of character (infinite power)
#4  July 08, 2020, 04:40:23 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
persistent parameter does not work in negative states
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: freeze power value of character (infinite power)
#5  July 08, 2020, 09:09:44 pm
  • avatar
  • *
Thank you for the tip, XGargoyle, I am bound to make lots of mistakes as I am taking my first steps with Mugen.