I got a problem with a modifier I'm trying to make in maxscript. The idea is to have an array as modifier on a object, so you can quickly and dynamically change properties on the clones. It works okay at first, but my problem is that the modifier doesn't know/remember its parent. If you add the modifier on a box, you get a…
Hi McGreed, I gave a look at your code, haven't fixed it but I think I found the source of the issue. You declared a lot of global variables (usually a bad coding practice). Those variables are shared by every Array Object Modifier in the scene. If you create a Sphere, add your modifier and update the scene then in the…
Ahh cool, thanks I will look into that. I just thought I had to declare the variables and back then I couldn't really find the information about modifiers scripts, they all never seemed initiate at the start. So using the example you have there, all the values stays within the single modifier and not the scene?
Hi McGreed, the sample I wrote about structures is very generic and shows a better coding practice when you need to declare many variables at global scope. If you define a structure containing all the variables you need, then instance the structure at global scope, you are exposing to the global scope a single "name",…