msmith81
11-05-2010, 05:27 PM
Hi,
I am writing a script that will set certain colors in a Multi/Sub-Map. However, I can only find a clumsy way of doing this that does not lend itself well to scripting. For example: assuming my Multi/sub-map is stored in a variable called theMat, to set the fourth color I have to actually specify:
theMat.id_4_color = white
But that of course means that I cannot simply set a color by index. I want to be able to loop from 1 to 20 and set each color, but how can I do this if the index is actually part of the name? This is very frustrating, I was expecting an array that I could loop through. Please help. I cannot find a single word about this map in the help, which just adds to the frustration...
I am writing a script that will set certain colors in a Multi/Sub-Map. However, I can only find a clumsy way of doing this that does not lend itself well to scripting. For example: assuming my Multi/sub-map is stored in a variable called theMat, to set the fourth color I have to actually specify:
theMat.id_4_color = white
But that of course means that I cannot simply set a color by index. I want to be able to loop from 1 to 20 and set each color, but how can I do this if the index is actually part of the name? This is very frustrating, I was expecting an array that I could loop through. Please help. I cannot find a single word about this map in the help, which just adds to the frustration...
