Quote: " I can't reset the scale value back"
It is difficult to know without some code .It might depend on the design of your sliding bar. In the example I showed you here, we are into the main loop, so all positive data, will increase the object scale unless we reset the value to zero.
Here is an example that works with two different variables. Use the mouse .
autocam off
sync on
ink rgb(100,100,100),0
box 0,0,15,15
ink rgb(200,0,0),0
set cursor 0,0
print "<"
get image 1,0,0,15,15,1
ink rgb(100,100,100),0
box 0,0,15,15
ink rgb(200,0,0),0
set cursor 0,0
print " >"
get image 2,0,0,15,15,1
`-------------------------------------------------------------
`Our object
make object box 100,30,30,30
set object wireframe 100,1
make mesh from object 50,100 `MAKING A RESET MESH ....mesh 50
`second object to show every vertex position.
make object sphere 50,2:set object emissive 50,rgb(255,0,0)
position camera 0,50,-50
point camera 0,0,0
p=1
do
paste image 1,250,400 :paste image 2 ,280,400
if mousex()>250 and mousex()<264 and mousey()>400 and mousey()<415 and mouseclick() then sc2#=0.05 else sc2#=0
if mousex()>280 and mousex()<295 and mousey()>400 and mousey()<415 and mouseclick() then sc#=0.05 else sc#=0
if spacekey() then v=v+1 :sleep 200 :if v>vt then v=0
scale object 100,100+sc#-sc2#,100+sc#-sc2#,100+sc#-sc2#
lock vertexdata for limb 100,0
vt=get vertexdata vertex count()
x#=get vertexdata position x(v)
y#=get vertexdata position y(v)
z#=get vertexdata position z(v)
position object 50,x#,y#,z#
unlock vertexdata
g#=0.05
yrotate object 100,g#
make mesh from object 1,100 `mesh copy
change mesh 100,0,1 `updating mesh
if inkey$()="r" then change mesh 100,0,50 :sc#=0:sc2#=0 `reseting mesh
gosub info
sync
loop
info:
set cursor 0,0
ink rgb(0,255,0),0
print "Press Spacebar to change vertex "
print "Press Control to scale object "
print "Press r to reset size "
print
ink rgb(255,255,0),0
print "Vertex ",v
print "----------"
ink rgb(255,255,255),0
print "X ",x#
print "Y ",y#
print "Z ",z#
return
Cheers.
I'm not a grumpy grandpa