Rubes I'm afraid your method doesn't work because you are overwriting X,10 with value 2 directly after writing value 1 to the same X.
Since it seems that Array does not like to mix and match XY and XYZ so I have stored the number of objects in Array(99,ObjectType,0) and now it will load properly.
Daniele I have used XYZ since you are using more than one active. Using one active with directions/animation frames set to switch/box would be much easier since you would only have to run a fastloop that would create one object and then you could set it to switch or box, etc. and you would not need the Z dimension. However since I see you have already used directions for different sized models (of course you could use the 'scale' function if you wanted to resize) it was necessary to designate DimX as the type of object ie. switch/box (set in its variable 'ObjectType' upon creation as you point out in your last post - see near top of mfa), then the ID of the object as DimY (to be loaded by LoopIndex in the relevant fastloop), and DimZ (2, 3 and 4, as you have in your values) as Xpos (2), Ypos (3) and MODEL_SWITCH (4).
The 3D array:
| X(Type) |
Y(ID) |
Z(xpos=1, ypos=2, colour/direction/variable=3) |
VALUE that is written to this position |
| 0 |
0 |
2 |
Xpos of first Switch |
| 0 |
0 |
3 |
Ypos of first Switch |
| 0 |
0 |
4 |
Colour of first Switch |
| 0 |
1 |
2 |
Xpos of second Switch |
| 0 |
1 |
3 |
Ypos of second Switch |
| 0 |
1 |
4 |
Colour of second Switch |
| etc. |
|
|
|
| 1 |
0 |
2 |
Xpos of first Box |
| 1 |
0 |
3 |
Ypos of first Box |
| 1 |
0 |
4 |
Colour of first Box |
| ...and so on. |
|
|
|
This way it will be easy for you (if you want) to have as many types of actives as you want AND as many of each type as you need AND as many variables and other values for each active as MMF can handle. You would just need to add more loops of similar nature to the LOAD group.
Of course there may still be a more efficient way of doing this, if so, please chime in y'all!
working MFA:
Attachment 10600