Ok this is a new problem that I have encountered. This is for a slider in a gui type setting. The value "value" should be THE NAME of the variable it adjusts. Simply put I want to adjust a variable via a variable. So this should take the name of the var they player will adjust via the slider bar. So the player could adjust the "lives" variable if it were passed into the slider's value parameter.
Type slider Global slider_list:TList=New TList Field x#,y#,width#,height#,Value#,max_value# Function Create( x#,y#,width#,height#,Value#,max_value#) Local temp:slider= New slider temp.x=x temp.y=y temp.width=width temp.height=height temp.Value=Value temp.max_value=max_value ListAddLast(slider_list,temp) EndFunction Method Update() ' draw the craps draw_gradient(200,200,200,255,255,255,x,y,width,height) draw_gradient(120,120,120,200,200,200,x,y,width*(Value/max_value),height) ' update the mouse If MouseX()>=x and MouseY()>=y and MouseX()<=x+width and MouseY()<=y+height and MouseDown(1) Value=max_value*((MouseX()-x)/width) End If End Method End Type