Change color for each loop from material list

Greeting everyone!

I would like to change a mesh material randomly each time the loop is completed. There is 3 material that I want it to choose from. Also, 3 meshes will be switching simultaneously between these 3 colors so I don’t want the same color to appear to more than one mesh at all time.

What is the best way to do this?

Thank you for your help!

You can use mesh → set material, but it is better to change color parameter in material, not material itself.

And not in level blueprint…

Well, I understand your method, but I wished there was a way to choose the material instance from some sort of material array. There is 3 characters jumping out of holes every 4 seconds. I want them to wear a different hat color everytime from the 3 materials above but I don’t want the same color on more than a character at all time. If it’s not possible in level blueprint, could it be some sort of function or something? Thanks for the reply!

you can create material array variable in level BP, manually assign 3 materials to its elements, and use “random integer in range” (with range 0-2) to get random element from that array and assign it to character by SetMaterial function.

but if you want different materials for every character, you need some specific condition.

for example, 1st character get material from index 1, than you need to assign index 0 to 2nd character, and index 2 to 3rd.

it looks like it requires bunch of branches, but its weird solution…