|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
MaxScript help !!!
Write a script that adds the functionality to the "Lec 2 Demo" utility that we started in class. The "red box" button creates a red box of default dimensions somewhere on the x-y plane. The "Yellow Box" does the same thing except that the box color is yellow. When a person presses the "Delete" button, the utility should delete objects according to the option set in the radiobuttons.
that my code : utility utDemo "My First Utility" ( Button btnMakeRedBox "RedBox" toolTip:"Make a Box" \ -- red button align:#Left Width:70 across:2 Button btnMakeYellowBox "YellowBox" toolTip:"Make a Yellow Box" \-- Yellow button align:#Left Width:70 across:2 RadioButtons rdoDelete "Remove..."\ labels:#("boxes only", "Everything except boxe","all")\ default:1 columns:1 button button3 "Delete Now" -- delete button local b, c= classof != b on spinnerExample open do ( s=undefined ) --button RED box handler on btnMakeRedBox pressed do ( b=box wirecolor:[255,0,0] ) --button Yellow box handler on btnMakeYellowBox pressed do ( b=box wirecolor:[255,255,0] --b.pos = [0,0,1] ) --button3 Delete handler on button3 pressed do ( if (rdoDelete.state == 1) then delete b if (rdoDelete.state == 2) then delete c ) ) I have problem with RadioButtons where use RadioButtons and delete button |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Other Programming Languages > MaxScript help !!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|