|05 May 2010||#1|
Join Date: May 2010
Controlling Daylight System with MAXscript
I'm just starting to learn MAXScript, and I know the basics, but I would like to figure out how to change a Daylight system that I have manually created using a script.
Based on this documentation, I've put together the following code:
I'm not exactly sure where to insert the actual desired time value (I've tried a few places). In any case, when I select the code and press Enter to run it, I get the following error:
There is precious little documentation on this, so I would appreciate the help!
|05 May 2010||#2|
london, United Kingdom
Join Date: May 2006
The first three lines arent actually needed.
If you have created the sunlight system, you need to call the function like so:
I take it you are starting out with max so i'll explain it a bit.
"fn" means you're starting a new function. after that comes the function name followed by any paramaters you want to pass to the function. The function code is the bit between the brackets. You need to define the function before calling it (otherwise it doesnt exist yet). so in the example below it does just that.
If the function needs paramaters, you must specify what they are by putting it in the brackets. the example passes 300.0
now it loads and returns and array with 3 values called solar_array.
to access the individual values you do it like this:
Last edited by dutch_delight : 05 May 2010 at 12:55 PM.
|05 May 2010||#3|
Join Date: Sep 2003
Thread automatically closed
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|