I am making my first script which simply moves a model up or down based on an input to a textbox. I have not figured out how to read the integer typed in the textbox. The reference said that suffix .text would would give it, but it didn't seem to work. All help would be greatly appreciated. Thanks in advance.
rollout mover_script "make stuff move" width:159 height:315
(
button btn1 "move up" pos:[9,7] width:66 height:19
button btn2 "move down" pos:[9,30] width:66 height:19
edittext tbox "" pos:[8,142] width:143 height:20
on mover_script open do
global amount = 12
on btn1 pressed do
$.pos.z += amount
on btn2 pressed do
$.pos.z -= amount
on tbox entered text do
amount = tbox.text
)floater= newrolloutfloater "..." 159 315
addrollout mover_script floater
jos · 2012-01-01