Mesh array Random color

I want to change my objects color and make them same color when i press my gamepad button, But
At this Screenshot my code makes different color each object

where am i doing wrong ?

It generates a new color each time its called. You should set the random color as a variable when you press the gamepad button, and then just plug the variable into the set vector vector parameter (not the return value directly).

You should have your Create Dynamic Material Instance before For Loop macro. Create a new Linear Color variable and drop it in your graph before for each loop as a setter and connect that Make Color to that variable. You can then use that variable with Set Vector Parameter node.

If you are still unsure lemme know. I’ll make a screenshot. :slight_smile:

screen shot ll be very useful, m kind a very beginner level =)

Drag off from “Return Value”, and click promote to variable

Here is an example screenshot :). Assign the Material Instance to your meshes.

Thnx much my life savers =)

Happy Blueprinting :wink: