googlo
12-08-2002, 11:16 PM
Ok, this is frustrating. This simple utility sometimes works and sometimes doesn't. For some reason (most of the time) Max doesn't recognize "b" as being anything. I get an ">> MAXScript Rollout Handler Exception: -- Unknown property: "Taper" in undefined <<"
But then other times, with no intervention of my part other than re-evaluating the script using "evaluate all" with repeated tries, it does work! It's like a randomn thing, why@!@@@@$#@#$
Here is the script, does it do what I'm talking about to you?:
-- Game Box Script
-- Author: Alexander Esppeschit Bicalho
Utility gamebox "Game Box"
(
Button create "Create Object"
spinner amount "Taper Amount:" range:[-10,10,-0.2]
on create pressed do
(
b = box() -- this creates the box
b.height = 30 -- these commands define its properties
b.width = b.length = 40
b.mapcoords = on
b.heightsegs = 5
addmodifier b (taper()) -- adds the taper modifier and adjusts it
b.taper.amount = -0.2
) -- end on create pressed
on amount changed val do
(
b.taper.amount = val -- adjusts the taper amount through the spinner
) -- end on amount
) -- end gamebox utility
But then other times, with no intervention of my part other than re-evaluating the script using "evaluate all" with repeated tries, it does work! It's like a randomn thing, why@!@@@@$#@#$
Here is the script, does it do what I'm talking about to you?:
-- Game Box Script
-- Author: Alexander Esppeschit Bicalho
Utility gamebox "Game Box"
(
Button create "Create Object"
spinner amount "Taper Amount:" range:[-10,10,-0.2]
on create pressed do
(
b = box() -- this creates the box
b.height = 30 -- these commands define its properties
b.width = b.length = 40
b.mapcoords = on
b.heightsegs = 5
addmodifier b (taper()) -- adds the taper modifier and adjusts it
b.taper.amount = -0.2
) -- end on create pressed
on amount changed val do
(
b.taper.amount = val -- adjusts the taper amount through the spinner
) -- end on amount
) -- end gamebox utility
