I'm creating a gauge for a game feature called stagger stun and I'm having trouble figuring out the filler's scale equation. The feature works by causing p2 to go into a stagger/stun (not dizzy) state where you have the option to mash out of it to avoid further combos and there are certain moves that cause the stagger. Here's my code:
;====================STAGGER STUN SYSTEM====================================
;THIS SETS A VARIABLE TO THE MASH VALUE AND RECOGNIZES WHEN THE OPPONENT IS IN STAGGER STUN
[State 0, VarSet]
type = VarSet
trigger1 = stateno = 1406 && numtarget(500)=1
trigger1 = target,stateno = 1415
trigger2 = stateno = 210 && numtarget(500)=1
trigger2 = target,stateno = 1410
trigger3 = stateno = 1403 && numtarget(500)=1
trigger3 = target,stateno = 1410
v = 7
value = 30
persistent = 0
:THESE ARE THE COMMANDS TO USE FOR MASHING
[State 0, VarAdd]
type = VarAdd
triggerall = numtarget(500)=1
trigger1 = target,command = "x" || target,command = "y" || target,command = "z"
trigger2 = target,command = "a" || target,command = "b" || target,command = "c"
trigger3 = target,command = "up" || target,command = "down" || target,command = "left" || target,command = "right"
trigger4 = target,command = "uf" || target,command = "ub" || target,command = "df" || target,command = "db"
v = 7
value = -1
;RESETS THE VARIABLE
[State 0, VarSet]
type = VarSet
trigger1 = var(7) <= 0 || p2movetype != H
v = 7
value = 0
;HERE IS THE HELPER CODE:
[State -2, Helper]
type = Helper
triggerall = numhelper(1)=0
trigger1 = ((stateno = [1410,1415]) && stateno != 1411)
name = "Stagger Meter"
ID = 1
stateno = 4500
pos = 0,0
facing = 1
postype = p1
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1
;HELPER STATE========
[statedef 4500]
physics = N
velset = 0,0
anim = 7999
ctrl = 0
sprpriority = 0
[State 0, BindToRoot]
type = BindToRoot
trigger1 = 1
pos = 5 * root,const(size.head.pos.x),root,const(size.head.pos.y)-30
;THIS IS THE EMPTY GUAGE====
[State 0, Explod]
type = Explod
trigger1 = numexplod(1)=0
anim = 10000
ID = 1
facing = 1
bindtime = -1
pos = 0,0
postype = p1
pausemovetime = 999
supermovetime = 999
scale = 0.3,0.3
ownpal = 1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (root,stateno != [1410,1415])
trigger2 = stateno = 1411
id = 1
ignorehitpause =1
;THIS IS THE FILLER===
[State 0, Explod]
type = Explod
trigger1 = numexplod(2)=0
anim = 10001
ID = 2
facing = 1
bindtime = -1
pos = 0,0
postype = p1
pausemovetime = 999
supermovetime = 999
scale = 0.3,0.3
ownpal = 1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = numexplod(2)=1
ID = 2
scale = ;OK SO THIS IS THE SCALE I NEED TO ADJUST TO SCALE FROM FULL TO NOTHING DEPENDING ON VAR(7)'s VALUE?
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (root,stateno != [1410,1415])
id = 2
[State 0, DestroySelf]
type = DestroySelf
trigger1 = (root,stateno != [1410,1415])
Any help would be appreicated.