Offset Formula


I'm trying to make a Battery Indicator based on one of BrandonCraft's Wave tutorial. The setup is like this: I have images of waves on a sideways loop at a specific speed so that it seamless with a solid circle in front to mask it.

Animation runs fine. Next I want the waves to move up and down based on the Battery %. The waves images are in a horizontal stack group. So I go the stack group's Position, move the images to where the waves are the bottom of the circle indicating 0% and note down three number I get. Next, I type in the formula: $X-bi(level)/100*Y$" where X is the number when battery is 0, and Y is a little less than the width of the circle so that the waves stop at the top.

I do this, save. I go to the homescreen and everything works fine for a few minutes then the waves go everywhere.

Please help, thanks!