NemesisX64
02-04-2010, 01:32 PM
Hello, I just started using maxscript today and I'm trying to code sth for my colleague.
I got the floating window and rollup working but now I'm trying to get some additional functionality. The gui of the script asks how many of "this" does the object have and how "many" of that does the object have. Once those questions are answered and a button is pressed the loop starts. The number of "this" basically determines which script to run and that part works with if and it without probs.
What it does next it shoots up another rollup using createdialog rollupname and in there it's asking for a value for the 1st of "that" many and the for loop should go from 1 to "that" many (for i = to "that"varname do) but the problem is that i need it to wait for the user to input a number that is attached to another variable that will be used in that script, and i need to do that "that" many times, now whenever i try to do that, the loop doesn't wait for the user to input a number, it just goes through the script, just uses the default value and goes straight to "that"th of "that" many (i inserted a test label in the interface to check this out just to see what happens with the loop).
Is there some way to make the loop stop and wait until the user enters the value and clicks ok on the small dialog which then closes it(the variable does get assigned but only for the "taht"th run through and the script is already finished before i manage to input the value, the ok button closing the dialog box does work at least :D ) ?
I got the floating window and rollup working but now I'm trying to get some additional functionality. The gui of the script asks how many of "this" does the object have and how "many" of that does the object have. Once those questions are answered and a button is pressed the loop starts. The number of "this" basically determines which script to run and that part works with if and it without probs.
What it does next it shoots up another rollup using createdialog rollupname and in there it's asking for a value for the 1st of "that" many and the for loop should go from 1 to "that" many (for i = to "that"varname do) but the problem is that i need it to wait for the user to input a number that is attached to another variable that will be used in that script, and i need to do that "that" many times, now whenever i try to do that, the loop doesn't wait for the user to input a number, it just goes through the script, just uses the default value and goes straight to "that"th of "that" many (i inserted a test label in the interface to check this out just to see what happens with the loop).
Is there some way to make the loop stop and wait until the user enters the value and clicks ok on the small dialog which then closes it(the variable does get assigned but only for the "taht"th run through and the script is already finished before i manage to input the value, the ok button closing the dialog box does work at least :D ) ?
