So I'm creating a custom powerbar for one of my characters using a blank Helper with some Explods in MUGEN 1.1. I'm having trouble trying to scale and position the 'fill' layer so it lines up with the edge of the 'frame'.
I don't know how to go about having the fill layer positioned with the left width of the frame at all. I do have the scaling working, but it's using old-ass code from years ago which I could never get exactly right.
Here's what the bar currently looks like (while the root has 150 power).
Spoiler, click to toggle visibilty
Here's the powerbar code.
Spoiler, click to toggle visibilty
;=========================================================================
; EXS Gauge
;=========================================================================
[StateDef 20000]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
sprpriority = 0
[State 20000, Change Animation]
type = ChangeAnim
trigger1 = !time
value = 9999
;========================< EXS Gauge >========================
[State 20000, Set Variable]
type = VarSet
trigger1 = 1
var(1) = floor(root, power / 1) % 10 * 1
ignorehitpause = 1
[State 20000, Set Variable]
type = VarSet
trigger1 = 1
var(2) = floor(root, power / 10) % 10 * 1
ignorehitpause = 1
[State 20000, Set Variable]
type = VarSet
trigger1 = 1
var(3) = floor(root, power / 100) % 10 * 1
ignorehitpause = 1
[State 20000, Set Variable]
type = VarSet
trigger1 = 1
var(4) = floor(root, power / 1000) % 10 * 1
ignorehitpause = 1
[State 20000, EXS Gauge: Bar]
type = Explod
trigger1 = !numexplod(20000)
id = 20000
anim = 20000
pos = ifelse((teamside = 1), 250, screenwidth - 250), screenheight - 40
space = screen
facing = ifelse((teamside = 1), 1, -1)
ownpal = 1
scale = 1, 1
ontop = 1
[State 20000, EXS Gauge: Bar Fill]
type = Explod
trigger1 = timemod = 16, 0
id = 20001
anim = 20001
pos = ifelse((teamside = 1), 250, screenwidth - 250), screenheight - 40
space = screen
facing = ifelse((teamside = 1), 1, -1)
ownpal = 1
;scale = 1, 1
ontop = 1
[State 20000, Modify Effect]
type = ModifyExplod
trigger1 = numexplod(20001)
id = 20001
scale = ifelse((root, power != 3000), root, power * 0.00033333 - floor(root, power * 0.00033333), 1.0), 1.0
ignorehitpause = 1
[State 20000, Remove Explods]
type = RemoveExplod
trigger1 = 1
id = 20100
[State 20000, EXS Gauge: 0 Text]
type = Explod
trigger1 = !numexplod(20100)
id = 20100
anim = 20100 + var(1)
pos = ifelse((teamside = 1), 202, screenwidth - 150), screenheight - 65
space = screen
facing = 1
ownpal = 1
scale = 1, 1
ontop = 1
[State 20000, EXS Gauge: .0 Text]
type = Explod
trigger1 = !numexplod(20101)
id = 20101
anim = 20122
pos = ifelse((teamside = 1), 190, screenwidth - 162), screenheight - 65
space = screen
facing = 1
ownpal = 1
scale = 1, 1
ontop = 1
[State 20000, Remove Explods]
type = RemoveExplod
trigger1 = 1
id = 20102
[State 20000, EXS Gauge: 0.0 Text]
type = Explod
trigger1 = !numexplod(20102)
id = 20102
anim = 20110 + var(2)
pos = ifelse((teamside = 1), 175, screenwidth - 177), screenheight - 65
space = screen
facing = 1
ownpal = 1
scale = 1, 1
ontop = 1
[State 20000, Remove Explods]
type = RemoveExplod
trigger1 = 1
id = 20103
[State 20000, EXS Gauge: 00.0 Text]
type = Explod
trigger1 = !numexplod(20103) && root, power >= 100
id = 20103
anim = 20110 + var(3)
pos = ifelse((teamside = 1), 155, screenwidth - 196), screenheight - 65
space = screen
facing = 1
ownpal = 1
scale = 1, 1
ontop = 1
[State 20000, Remove Explods]
type = RemoveExplod
trigger1 = 1
id = 20104
[State 20000, EXS Gauge: 000.0 Text]
type = Explod
trigger1 = !numexplod(20104) && root, power >= 1000
id = 20104
anim = 20110 + var(4)
pos = ifelse((teamside = 1), 135, screenwidth - 215), screenheight - 65
space = screen
facing = 1
ownpal = 1
scale = 1, 1
ontop = 1
[State 20000, EXS Gauge: 000.0% Text]
type = Explod
trigger1 = !numexplod(20105)
id = 20105
anim = 20123
pos = ifelse((teamside = 1), 217, screenwidth - 135), screenheight - 65
space = screen
facing = 1
ownpal = 1
scale = 1, 1
ontop = 1
[State 20000, No Shadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
Any help would be appreciated. Hopefully I explained this correctly, lol.