function move( dir, steps, time ) if dir == 'up' then if oldPower <= 94 then bang.LabelMoveBy ( 'battery'..nonstep.vars.read( 'pix', xevar['pixCount'] ), '0' , '-4', steps, time ); else bang.LabelMoveBy ( 'battery'..nonstep.vars.read( 'pixTop', xevar['pixCount'] ), '0' , '-4', steps, time ); if oldPower = 99 then bang.LabelMoveBy ( 'battery4', '0', '-4', steps, time ); end end nonstep.vars.set( 'pixCount', xevar['pixCount'] + 1 ); if xevar['pixCount'] > 14 then nonstep.vars.set( 'pixCount', 1 ); end oldPower = oldPower + 1; elseif dir == 'down' then nonstep.vars.set( 'pixCount', xevar['pixCount'] - 1 ); if xevar['pixCount'] < 1 then nonstep.vars.set( 'pixCount', 14 ); end if oldPower <= 95 then bang.LabelMoveBy ( 'battery'..nonstep.vars.read( 'pix', xevar['pixCount'] ), '0' , '4', steps, time ); else bang.LabelMoveBy ( 'battery'..nonstep.vars.read( 'pixTop', xevar['pixCount'] ), '0' , '4', steps, time ); if oldPower = 100 then bang.LabelMoveBy ( 'battery4', '0', '4', steps, time ); end end oldPower = oldPower - 1;end