Custom Gauge/Explod problems

Started by Ricepigeon, May 31, 2008, 07:45:57 AM

Previous topic - Next topic

Ricepigeon

Alright essentially here's the rundown:

There is a gauge that is divided into 12 parts. Each attack adds 1 to this gauge until it reaches 12, the maximum. A certain attack cannot be used unless there are at least 4 bars to this gauge, which will also deplete 4 bars from the gauge. The code I have is as follows:


[Statedef -2]
[State -2, Varset]
type = Varset
trigger1 = var(48) > 12
v = 48
value = 12
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 1
trigger1 = numexplod(130000) = 0
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13002
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130000
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) = 0
trigger1 = numexplod(130000) = 1
id = 130000
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 2
trigger1 = numexplod(130001) = 0
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13003
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130001
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) < 2
trigger1 = numexplod(130001) = 1
id = 130001
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 3
trigger1 = numexplod(130002) = 0
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13004
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130002
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) < 3
trigger1 = numexplod(130002) = 1
id = 130002
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 4
trigger1 = numexplod(130003) = 0
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13005
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130003
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) < 4
trigger1 = numexplod(130003) = 1
id = 130003
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 5
trigger1 = numexplod(130004) = 0
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13006
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130004
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) < 5
trigger1 = numexplod(130004) = 1
id = 130004
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 6
trigger1 = numexplod(130005) = 0
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13007
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130005
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) < 6
trigger1 = numexplod(130005) = 1
id = 130005
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 7
trigger1 = numexplod(130006) = 0
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13008
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130006
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) < 7
trigger1 = numexplod(130006) = 1
id = 130006
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 8
trigger1 = numexplod(130007) = 0
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13009
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130007
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) < 8
trigger1 = numexplod(130007) = 1
id = 130007
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 9
trigger1 = numexplod(130008) = 0
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13010
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130008
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) < 9
trigger1 = numexplod(130008) = 1
id = 130008
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 10
trigger1 = numexplod(130009) = 0
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13011
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130009
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) < 10
trigger1 = numexplod(130009) = 1
id = 130009
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 11
trigger1 = numexplod(130010) = 0
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13012
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130010
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) < 11
trigger1 = numexplod(130010) = 1
id = 130010
ignorehitpause = 1

[State -2, Explod]
type = Explod
triggerall = Name != "Metal_Kikyo"
trigger1 = var(48) = 12
trigger1 = roundstate = 2
trigger1 = var(47) != 0
Anim = 13013
pos = Ifelse(Teamside = 1,75, 245),67
;The position of the groove,change it according to where
;you want to put it)
postype = left
ownpal = 1
bindtime = -1
pausemovetime = -1
supermovetime = -1
facing = 1
sprpriority = 41
;ontop = 1
ID = 130011
ignorehitpause = 1

[State -2, RE]
type = removeexplod
trigger1 = var(48) < 12
trigger1 = numexplod(130011) = 1
id = 130011
ignorehitpause = 1


And the code that was added to the attack:


[State 2500, Deplete]
type = varadd
trigger1 = movehit
v = 48
value = -4
persistent = 0
ignorehitpause = 1


At first glance, everything works fine; the gauge fills up & depletes. After a while, however, the gauge will stop filling up and no more Explods can be created, from either the gauge itself or other attacks.

Bastard Mami

Im just see a bunch of explod code, for which I dont care about, a var add limiter(good) and the code to deplete, I don't see where you add to the var.

personally, I would change the deplete into this.

[State 2500, Deplete]
type = varadd
trigger1 = movehit = 1
v = 48
value = -4

Question, the actual add-remove points system still works (you can display your var to the clipboard to check that) meaning that only the explod system breaks, or everything breaks?

XGargoyle

On a general note, mugen only allows for 64 explods at the same time. Maybe the problem comes from an excessive number of explods that are either created by your character (or the enemy) and don't get removed correctly. At this point, you may think the gauge bar doesn't work because it doesn't display the explods.

Do as [E] said, display the variable's value on the debug clipboard and check if the variable keeps working after some time. This way you you can see if it's a explod limitation issue, or if the code for the variables is in fact broken.


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!

Ricepigeon

The variable still works, since the one move which requires at least 4 works correctly even when the gauge isn't being displayed (can't be used if less than 4, works and depletes when otherwise), so I'm convinced its more of an explod issue.

Bastard Mami

Try making different anims for the 12 different states teh bar can be in, then make a helper that cahgens anims based on that; that method should get rid of any explod limit problems. Or alternatively, try to improce your explod tracking method.

Ricepigeon

Quote from: Satou Sei on June 01, 2008, 02:55:03 AM
Try making different anims for the 12 different states teh bar can be in, then make a helper that cahgens anims based on that; that method should get rid of any explod limit problems.

Did just that. At first it solved the explod problem, but the problem now affected helpers instead. Turns out I forgot to add a trigger that prevents the creation of another helper if it exists already. It now works fine, and I'm convinced this was the problem I was having before. The way it's set up now though is fine. Don't ask me why I didn't think of using a Helper.

Actually after reading your suggestion, it seems as if you're saying to change the actual animation of the helper, instead of having the Helper create the explods depending on what state the helper is in, which is what I did. The only problem I see with that is that the Helper's y axis would still be relative to the player's, rather than staying at a fixed point on the screen independent of the z-offset of the stage, which an explod would allow.

Bastard Mami

As long as it works properly the method is hardly important.