Search code examples
3dsmaxmaxscript

MaxScript defining variables in struct


How would I define a variable in a struct?

So for example:

struct test (
     variable = 123
)

If I were to do this:

 test.variable

It would not find it. How would I make it so I can access the value of the variable in the struct?


Solution

  • I just figured it out:

    v = test()
    v.variable
    

    That should work.