how to get a material to change to a specific color using booleans?

I am trying to use a boolean to get my object to change from blue to red and when hit again it changes to orange.

Use an integer instead, Start at 0, when hit add 1.

After you change and store the int, use it with a ‘Switch On Integer’ to set the new material of your actor.

If you do not want to create (and maintain) multiple materials, try a Dynamic Material Instance. In your material, *Convert *the colour (RMB on the node) to Parameter and give it a name. You will be able to change its value during runtime.

This is how you access it in your object:

The bool can be omitted altogether, of course.

Also, more info here:

My case may be a little different, but this may be useful.
In the “Instanced Materials” article by Epic there is an example that shows using StaticSwitch node for changing between different color inputs of your Material / Material Instance (works only if you want to switch between 2 inputs, not more). In my case, I used it for switching between Texture & Color inputs in the material instance. I hope this helps!

Epic’s clue to using StaticSwitch.

I used Static Switch node for switching between textures and colors for my material.