SetClearColor(0,100,255)
global startVal# = 300
global endVal# = 700
global widthVal# = 0
global Xprogress = 200
global Yprogress = 300
global xMin = 0
global xMax = 100
global xPos = 73 // <--change %
//====================================================
global progress_back
progress_back = CreateSprite(0)
SetSpriteColor(progress_back, 50, 60, 90, 255)
SetSpriteSize(progress_back, endVal#-startVal#, 30)
SetSpritePosition(progress_back, Xprogress, Yprogress )
//----------------------------------------------------
global progress_front
progress_front = CreateSprite(0)
SetSpriteColor(progress_front, 240, 70, 60, 255)
SetSpriteSize(progress_front, endVal#-startVal#, 30)
SetSpritePosition(progress_front, Xprogress, Yprogress )
//====================================================
SetPercentValue(xPos) //Set %
do
print("progress_front X: "+str(GetSpriteX(progress_front)))
print("progress_front Y: "+str(GetSpriteY(progress_front)))
print("progress_front Width: "+str(GetSpriteWidth(progress_front)))
print("progress_front Height: "+str(GetSpriteHeight(progress_front)))
print("percent: "+str(xPos))
Sync()
loop
function SetPercentValue ( i as integer )
widthVal#=(endVal#-startVal#)/xMax*i
SetSpriteSize(progress_front, widthVal#, GetSpriteHeight(progress_front))
endfunction