Display the volume of an object
Hey, I found a volume calculation script on this forum, and Im trying to use it with my Rollout, by having a button activate it, and display the result somewhere. First problem, what should I use to display the volume? An edit box or a label, or something else, but I don't want to be able to touch whatever is displayed so edit box seems like the wrong choice.
And also, how do I actually display whats stored in that 'volume' variable after its been calculated?? I cant seem to find a way to do it :/ Iv checked on google, but cant find anything about "displaying variables". I hope someone can help.
Comments
Why you serch in Google then
Why you serch in Google then Max has excellent script reference? While Listener or maxScript Editor is open and selected, just press F1 to open it. But however, let helps you a little bit to start. If you already decide to display result using Label UI control, then as you can see, it used string value, so if your function or variable keeps string - you can assign it directly, or if not - need to convert it to a string. There is some simple example:
my recent MAXScripts RSS (archive here)
Thanks. I was wondering why
Thanks. I was wondering why mine wasn't working, and I automatically assumed I wasn't using the code correctly, when in fact I wasn't even calling the volume calculation function... It was just sitting there.. so that was my problem :P I got it displaying in an edit box now, thanks anyway.