YesNoOk
avatar

My Groove checking code doesn't work... (Read 581 times)

Started by Trinitronity, February 21, 2013, 05:06:34 pm
Share this topic:
My Groove checking code doesn't work...
#1  February 21, 2013, 05:06:34 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
I tried to make a character with grooves, just for fun.
However, there is a problem:
Code:
[State -1, Standing Parry]
type = hitoverride
triggerall = var(99) = 0 || var(99) = 2
trigger1 = !AIlevel
trigger1 = roundstate = 2 && (statetype = S || stateno = 5120)
trigger1 = command = "fwd" && command != "back" && command != "up" && command != "down"
trigger1 = ctrl || (stateno = [700, 701]) || stateno = 5120
trigger1 = var(21) := 1
attr = SA, AA, AP
stateno = 700
slot = 0
time = 8

[State -1, Crouching Parry]
type = hitoverride
triggerall = var(99) = 0 || var(99) = 2
trigger1 = !AIlevel
trigger1 = roundstate = 2 && statetype != A
trigger1 = command = "down" && command != "fwd" && command != "back" && command != "up"
trigger1 = ctrl || (stateno = [700, 701]) || stateno = 5120
trigger1 = var(21) := 2
attr = C, AA, AP
stateno = 701
slot = 0
time = 8

[State -1, Air Parry]
type = hitoverride
triggerall = var(99) = 0 || var(99) = 2
trigger1 = !AIlevel
trigger1 = roundstate = 2 && statetype = A
trigger1 = command = "fwd" && command != "back" && command != "up" && command != "down"
trigger1 = ctrl || stateno = 702
trigger1 = var(21) := 3
attr = SA, AA, AP
stateno = 702
forceair = 1
slot = 0
time = 7
Code:
[State -1, Standing Parry]
type = hitoverride
triggerall = AIlevel && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(99) = 0 || var(99) = 2
trigger1 = (Ctrl || StateNo=21)
trigger1 = Random < (IfElse(P2bodydist x > 90,280+(Lifemax-Life)/2, 90+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger1 = var(21) := 1
trigger2 = StateNo = [700, 701]
trigger2 = Random < (450+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0)
trigger2 = var(21) := 1
trigger3 = (Ctrl || StateNo=21) && (Enemynear,NumProj || Enemynear,NumHelper)
trigger3 = random < (380+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0)
trigger3 = var(21) := 1
attr = SA, AA, AP
stateno = 700
slot = 0
time = 8

[State -1, Crouching Parry]
type = hitoverride
triggerall = AIlevel && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(99) = 0 || var(99) = 2
trigger1 = (Ctrl || StateNo=21)
trigger1 = Random < (IfElse(P2Statetype=C,260+(Lifemax-Life)/2, 100+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger1 = var(21) := 1
trigger2 = StateNo = [700, 701]
trigger2 = Random < (450+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0)
trigger2 = var(21) := 2
trigger3 = time < 5 || StateNo=21
trigger3 = var(21) := 1
attr = C, AA, AP
stateno = 701
slot = 1
time = 8

[State -1, Air Parry]
type = hitoverride
triggerall = AIlevel && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = var(99) = 0 || var(99) = 2
trigger1 = ctrl && random < (10+(Lifemax-Life)/10 * (AIlevel ** 2 / 64.0))
trigger1 = var(21) := 1
trigger2 = stateno = 702
trigger2 = random < ((250+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger2 = var(21) := 1
trigger3 = Ctrl && (Enemynear,NumProj || Enemynear,NumHelper)
trigger3 = random < ((10+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger3 = var(21) := 3
attr = SA, AA, AP
stateno = 702
forceair = 1
slot = 0
time = 6
As you can see, Parry only should work on var(99)=0 (Capcom) and var(99)=2 (EX).
However, my char even parries on var(99)=1 (Arc System Works), which should NOT happen.
I even tried the alternate version:
Code:
[State -1, Standing Parry]
type = hitoverride
triggerall = var(99) := 0 || var(99) := 2
trigger1 = !AIlevel
trigger1 = roundstate = 2 && (statetype = S || stateno = 5120)
trigger1 = command = "fwd" && command != "back" && command != "up" && command != "down"
trigger1 = ctrl || (stateno = [700, 701]) || stateno = 5120
trigger1 = var(21) := 1
attr = SA, AA, AP
stateno = 700
slot = 0
time = 8

[State -1, Crouching Parry]
type = hitoverride
triggerall = var(99) := 0 || var(99) := 2
trigger1 = !AIlevel
trigger1 = roundstate = 2 && statetype != A
trigger1 = command = "down" && command != "fwd" && command != "back" && command != "up"
trigger1 = ctrl || (stateno = [700, 701]) || stateno = 5120
trigger1 = var(21) := 2
attr = C, AA, AP
stateno = 701
slot = 0
time = 8

[State -1, Air Parry]
type = hitoverride
triggerall = var(99) := 0 || var(99) := 2
trigger1 = !AIlevel
trigger1 = roundstate = 2 && statetype = A
trigger1 = command = "fwd" && command != "back" && command != "up" && command != "down"
trigger1 = ctrl || stateno = 702
trigger1 = var(21) := 3
attr = SA, AA, AP
stateno = 702
forceair = 1
slot = 0
time = 7
Code:
[State -1, Standing Parry]
type = hitoverride
triggerall = AIlevel && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(99) := 0 || var(99) := 2
trigger1 = (Ctrl || StateNo=21)
trigger1 = Random < (IfElse(P2bodydist x > 90,280+(Lifemax-Life)/2, 90+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger1 = var(21) := 1
trigger2 = StateNo = [700, 701]
trigger2 = Random < (450+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0)
trigger2 = var(21) := 1
trigger3 = (Ctrl || StateNo=21) && (Enemynear,NumProj || Enemynear,NumHelper)
trigger3 = random < (380+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0)
trigger3 = var(21) := 1
attr = SA, AA, AP
stateno = 700
slot = 0
time = 8

[State -1, Crouching Parry]
type = hitoverride
triggerall = AIlevel && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(99) := 0 || var(99) := 2
trigger1 = (Ctrl || StateNo=21)
trigger1 = Random < (IfElse(P2Statetype=C,260+(Lifemax-Life)/2, 100+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger1 = var(21) := 1
trigger2 = StateNo = [700, 701]
trigger2 = Random < (450+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0)
trigger2 = var(21) := 2
trigger3 = time < 5 || StateNo=21
trigger3 = var(21) := 1
attr = C, AA, AP
stateno = 701
slot = 1
time = 8

[State -1, Air Parry]
type = hitoverride
triggerall = AIlevel && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = var(99) := 0 || var(99) := 2
trigger1 = ctrl && random < (10+(Lifemax-Life)/10 * (AIlevel ** 2 / 64.0))
trigger1 = var(21) := 1
trigger2 = stateno = 702
trigger2 = random < ((250+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger2 = var(21) := 1
trigger3 = Ctrl && (Enemynear,NumProj || Enemynear,NumHelper)
trigger3 = random < ((10+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger3 = var(21) := 3
attr = SA, AA, AP
stateno = 702
forceair = 1
slot = 0
time = 6
But I still get the same results. I also placed them on different triggers, but still the same results. What do I do wrong?
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#2  February 21, 2013, 05:41:42 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Turn on your debug and watch as it tells you that the variable you're using is out of bounds. Only 60 variables, buddy, 0-59.
Re: My Groove checking code doesn't work...
#3  February 21, 2013, 07:07:03 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Okay, I did it like you said. It still doesn't work...
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#4  February 21, 2013, 07:27:22 pm
  • **
  • CvS style fan. ~ <3
    • Brazil
What the char you pretend add this?
Re: My Groove checking code doesn't work...
#5  February 21, 2013, 07:34:24 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Ryu, partially by PotS (SFF, AIR, SND, CMD and some CNS) and partially by me (SFF, SND, AIR & CMD additions, specials, supers and CvsASW system).
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#6  February 21, 2013, 07:37:59 pm
  • **
  • CvS style fan. ~ <3
    • Brazil
very good, I like very much of CvS chars with grooves.

Hey, you maked CvS Adel with grooves?
Last Edit: February 21, 2013, 07:43:17 pm by Akito
Re: My Groove checking code doesn't work...
#7  February 21, 2013, 07:39:56 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
This a help topic, Akito, not a topic about what type of characters you like.

Quote
Okay, I did it like you said. It still doesn't work...
All I told you to do was turn on the debug. Everything else was just telling you that your variable won't work because it's not valid. Logically, you should change your variable to a valid value.
Re: My Groove checking code doesn't work...
#8  February 21, 2013, 07:52:43 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
I truned on debug, but I don't know, how to find out, whenever a variable is valid or not...for which line should I look?
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#9  February 21, 2013, 07:54:48 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Like I said earlier, valid variables are 0-59 for INTs. If you read the documentation, you will increase your knowledge and prevent silly errors like these.

The debug errors appear on the top left of the screen. Always have debug on when programming or testing a character.
Re: My Groove checking code doesn't work...
#10  February 21, 2013, 08:23:08 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Hmm, I watch at the left corner, but the only invaled variables are var(56) and var(57).
Maybe, it helps, if I also post the config.txt:
Code:
;Groove Select (Test version)
;0: Capcom
;1: Arc System Works
;2: EX
[StateDef 7650]
physics = N
velSet = 0,0
anim = 1

[State 7650, 0 = Capcom, 1 = ArcSys, 2 = EX]
type = ParentVarSet
trigger1 = 1
var(59) = 1

[State 7650, End]
type = DestroySelf
trigger1 = RoundState = 2
At the moment, I make the char handle the grooves through this config.txt, until I have coded a proper groove selection.
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#11  February 21, 2013, 08:29:39 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
What does that have to do with the incorrect variable you're using? Are you even setting the variable? How does that affect the parry you need help with?

You're confusing me.
Re: My Groove checking code doesn't work...
#12  February 21, 2013, 08:38:50 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Ahem:
Command:
Code:
[State -1, Standing Parry]
type = hitoverride
triggerall = var(59) := 0 || var(59) := 2
trigger1 = !AIlevel
trigger1 = roundstate = 2 && (statetype = S || stateno = 5120)
trigger1 = command = "fwd" && command != "back" && command != "up" && command != "down"
trigger1 = ctrl || (stateno = [700, 701]) || stateno = 5120
trigger1 = var(21) := 1
attr = SA, AA, AP
stateno = 700
slot = 0
time = 8

[State -1, Crouching Parry]
type = hitoverride
triggerall = var(59) := 0 || var(59) := 2
trigger1 = !AIlevel
trigger1 = roundstate = 2 && statetype != A
trigger1 = command = "down" && command != "fwd" && command != "back" && command != "up"
trigger1 = ctrl || (stateno = [700, 701]) || stateno = 5120
trigger1 = var(21) := 2
attr = C, AA, AP
stateno = 701
slot = 0
time = 8

[State -1, Air Parry]
type = hitoverride
triggerall = var(59) := 0 || var(59) := 2
trigger1 = !AIlevel
trigger1 = roundstate = 2 && statetype = A
trigger1 = command = "fwd" && command != "back" && command != "up" && command != "down"
trigger1 = ctrl || stateno = 702
trigger1 = var(21) := 3
attr = SA, AA, AP
stateno = 702
forceair = 1
slot = 0
time = 7
Code:
[State -1, Standing Parry]
type = hitoverride
triggerall = AIlevel && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(59) := 0 || var(59) := 2
trigger1 = (Ctrl || StateNo=21)
trigger1 = Random < (IfElse(P2bodydist x > 90,280+(Lifemax-Life)/2, 90+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger1 = var(21) := 1
trigger2 = StateNo = [700, 701]
trigger2 = Random < (450+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0)
trigger2 = var(21) := 1
trigger3 = (Ctrl || StateNo=21) && (Enemynear,NumProj || Enemynear,NumHelper)
trigger3 = random < (380+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0)
trigger3 = var(21) := 1
attr = SA, AA, AP
stateno = 700
slot = 0
time = 8

[State -1, Crouching Parry]
type = hitoverride
triggerall = AIlevel && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(59) := 0 || var(59) := 2
trigger1 = (Ctrl || StateNo=21)
trigger1 = Random < (IfElse(P2Statetype=C,260+(Lifemax-Life)/2, 100+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger1 = var(21) := 1
trigger2 = StateNo = [700, 701]
trigger2 = Random < (450+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0)
trigger2 = var(21) := 2
trigger3 = time < 5 || StateNo=21
trigger3 = var(21) := 1
attr = C, AA, AP
stateno = 701
slot = 1
time = 8

[State -1, Air Parry]
type = hitoverride
triggerall = AIlevel && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = var(59) := 0 || var(59) := 2
trigger1 = ctrl && random < (10+(Lifemax-Life)/10 * (AIlevel ** 2 / 64.0))
trigger1 = var(21) := 1
trigger2 = stateno = 702
trigger2 = random < ((250+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger2 = var(21) := 1
trigger3 = Ctrl && (Enemynear,NumProj || Enemynear,NumHelper)
trigger3 = random < ((10+(Lifemax-Life)/2) * (AIlevel ** 2 / 64.0))
trigger3 = var(21) := 3
attr = SA, AA, AP
stateno = 702
forceair = 1
slot = 0
time = 6

[State -1, Reset Parry slot 0]
type = hitoverride
triggerall = Ifelse(AILevel=0,1,StateNo!=21)
trigger1 = (!ctrl && (stateno != [700, 702]) && stateno != 5120) || var(20)
trigger2 = movetype != I || (stateno = [100, 106]) || (stateno = [120, 132])
trigger3 = !AIlevel && (command = "holdback" || command = "holdup")
trigger4 = (statetype = S || statetype = C) && var(21) != 1 && var(21) != 2
trigger5 = statetype = A && var(21) != 3
trigger6 = (StateNo = [200,3999])
slot = 0
time = 0

[State -1, Reset Parry slot 1]
type = hitoverride
triggerall = AILevel
triggerall = Ifelse(AILevel=0,1,StateNo!=21)
trigger1 = (!ctrl && (stateno != [700, 702]) && stateno != 5120) || var(20)
trigger2 = movetype != I || (stateno = [100, 106]) || (stateno = [120, 132])
trigger3 = (statetype = S || statetype = C) && var(21) != 1 && var(21) != 2
trigger4 = statetype = A && var(21) != 3
trigger5 = (StateNo = [200,3999])
slot = 1
time = 0
Config.txt:
Code:
;Groove Select (Test version)
;0: Capcom
;1: Arc System Works
;2: EX
[StateDef 7650]
physics = N
velSet = 0,0
anim = 1

[State 7650, 0 = Capcom, 1 = ArcSys, 2 = EX]
type = ParentVarSet
trigger1 = 1
var(59) = 1

[State 7650, End]
type = DestroySelf
trigger1 = RoundState = 2
Initialize:
Code:
;==========< NORMAL RYU >==========
[Statedef 5900]
type = S
[State 5900, varreset]
type = varrangeset
trigger1 = !roundsexisted
value = 0
[State 5900, varreset]
type = varrangeset
trigger1 = !roundsexisted
fvalue = 0

[State 5900, Palette]
type = remappal
trigger1 = 1
source = 1, 1
dest = 1, palno

[State 5900, Configuration]
type = Helper
trigger1 = 1
helperType = Normal
stateNo = 7650
ID = 7650
name = "Configuration Helper"
posType = P1

[State 5900, modevar]
type = varset
trigger1 = 1
var(1) = 1
[State 5900, End]
type = changestate
trigger1 = !time
value = ifelse(roundno = 1, 190, 0)
I am sure, there is the connection (State 5900 creates Helper State 7650 and such), so here are all the created parts for the groove system in question.
To be honest, I don't see a problem there, so I would be very happy, if someone can find out, what's wrong there.
I really get the feeling, that I made a very stupid mistake somewhere...
...and sorry, if I'm confusing you.
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#13  February 21, 2013, 08:42:46 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
:= is changing the value of your variable, why are you using that operator? Just use a simple equal operator.
Re: My Groove checking code doesn't work...
#14  February 21, 2013, 08:48:24 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Okay, replaced the ":=" with a regular "=", but the problem is still there...
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#15  February 21, 2013, 09:01:03 pm
  • *****
  • Mega Klinklang confirmed
    • USA
    • ricepigeon.webs.com
You replaced all instances of var(59) := with =?

Try this, in your statedef -2 add this line:

[state -2, DTCB]
type = displaytoclipboard
trigger1 = 1
text = "Groove Variable is %d"
params = var(59)


Then open the char in mugen and turn on the debug info (ctrl+D). It should display the value of the variable underneath your character's information. If its what you set it to in the config then something else is the issue but if the value keeps changing then you have some other code changing the value of var(59).

<<-- Updated 09/14/14

You limit yourself so badly when you try to avoid variables. When you get over your fear of the "complexity" of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.
Re: My Groove checking code doesn't work...
#16  February 21, 2013, 09:16:25 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Sorry, but your code doesn't work either...
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#17  February 21, 2013, 09:18:53 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
He gave you clear instructions on how to use the code he posted! Disable any other displaytoclipboard controllers and use that one! It won't fix the problem for you, it will give you the information you need to help you fix the problem!
Re: My Groove checking code doesn't work...
#18  February 21, 2013, 09:22:05 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Yay, now the display works. Thanks!
However, I found out, that Ryu is always in var(59)=0 for some odd reasons...
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#19  February 21, 2013, 10:04:05 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Also place the config helper controller in the -2 so it can be summoned if the intro is skipped.
Re: My Groove checking code doesn't work...
#20  February 22, 2013, 08:02:08 am
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Thanks, but it still didn't worked...
...var(59) still stays 0...
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#21  February 22, 2013, 08:07:43 am
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Make sure you're not setting var(59) anywhere else. You're gonna have to learn to troubleshoot for yourself. =p
Re: My Groove checking code doesn't work...
#22  February 22, 2013, 08:32:51 am
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Hmm, I check the code now...
...there is no code, that would modify var(59)...
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#23  February 22, 2013, 12:21:32 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
var(59) is extremely commonly used as AI. Most common use for it ever. It may live in the .cmd file and be set to 0 if ailevel = 0.

If it's locked at 0 it IS being set somewhere and you need to find said somewhere.


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: My Groove checking code doesn't work...
#24  February 22, 2013, 04:38:37 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Okay, I changed all var(59) to fvar(59) just for fun,
Now, the variable is set to "bottom".
Does that means, that every variable is set then?
I also wanted to change all var(59) to var(58), until I found out that var(58) is already used...
...and even in the CMD, I couldn't find a place, where var(59) would be set to 0...
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#25  February 22, 2013, 05:31:13 pm
  • *****
  • Mega Klinklang confirmed
    • USA
    • ricepigeon.webs.com
Okay, I changed all var(59) to fvar(59) just for fun,
Now, the variable is set to "bottom".
Does that means, that every variable is set then?
I also wanted to change all var(59) to var(58), until I found out that var(58) is already used...
...and even in the CMD, I couldn't find a place, where var(59) would be set to 0...

If the variable is being set to bottom then that means that not only is something setting it, but its setting it to a value that is only generated as an error (such as division by 0).

If you're using fighter factory, there should be an option that generates a variable useage log. This will print plaintext of which variables are currently being used and which statenos they're being used in. Either use an unused variable that doesn't show in this list or check each state that your desired variable number appears in for any controllers that are interfering with your groove setting.

<<-- Updated 09/14/14

You limit yourself so badly when you try to avoid variables. When you get over your fear of the "complexity" of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.
Re: My Groove checking code doesn't work...
#26  February 22, 2013, 06:21:53 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Okay, I changed all var(59) to fvar(59) just for fun,
Now, the variable is set to "bottom".
Does that means, that every variable is set then?
I also wanted to change all var(59) to var(58), until I found out that var(58) is already used...
...and even in the CMD, I couldn't find a place, where var(59) would be set to 0...

If the variable is being set to bottom then that means that not only is something setting it, but its setting it to a value that is only generated as an error (such as division by 0).

If you're using fighter factory, there should be an option that generates a variable useage log. This will print plaintext of which variables are currently being used and which statenos they're being used in. Either use an unused variable that doesn't show in this list or check each state that your desired variable number appears in for any controllers that are interfering with your groove setting.
1. Method: integers 0-59 and floats 0-39 are used...
2. Method: Well, it doesn't look like there is a state that interferes with my groove setting...
I really don't know, what I should do now... :S
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#27  February 22, 2013, 08:02:04 pm
  • *****
  • Mega Klinklang confirmed
    • USA
    • ricepigeon.webs.com
D'oh, stupid me.

Just looked over what you did again. Fvar(59) isnt valid. Only Var(0)-Var(59) and fvar(0)-fvar(39) are valid variable numbers. Thats probably why it was returning value of bottom.

<<-- Updated 09/14/14

You limit yourself so badly when you try to avoid variables. When you get over your fear of the "complexity" of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.
Re: My Groove checking code doesn't work...
#28  February 22, 2013, 09:31:34 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Hmm, can I make a groove selection without variables, too?
Or do I really have to overwrite an existing variable?
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#29  February 23, 2013, 10:17:11 am
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Okay, I've overwriten a variable annd made sure, that it wasn't getting set to zero anywhere.
The problem is still there, so I undid my changes. I really need help.
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#30  February 23, 2013, 05:22:37 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
If your variable isn't being set anywhere else, then when you set it, it should be the value you set it to.

CTRL+F through all of your character's files and make sure the variable is not being set anywhere else. If yur variable is still set to zero, then your variable is being reset somewhere.
Re: My Groove checking code doesn't work...
#31  February 23, 2013, 05:42:00 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Okay, I searched again, and this time, no excuses. However, I still couldn't find a place, where the variable could be set to zero.
If my variable gets reseted somewhere, how can I prevent that then?
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: My Groove checking code doesn't work...
#32  February 24, 2013, 06:17:25 am
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
I don't really know what to tell you at this point.
Re: My Groove checking code doesn't work...
#33  February 24, 2013, 07:05:40 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Damn, I was so stupid.
I haven't noticed, that there already was a state 7650.
I could fix that problem now.
It may be just temporary, but I needed at least SOMETHING to test out the grooves.
Now I can continue my work.
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns