Hiya,
I’m trying to set up a material where one of a handful of colours are selected at random when the player presses a button. I already have the input mapping set up, but I’m struggling to figure out a way to get the colour change working. I thought I’d try using a Switch node in the material and then use a randomly-generated integer to drive the Switch Value, but I don’t know any way to call that parameter from the character blueprint where the input (in this case, pressing the E key) will happen OR how to create a random integer action in the material. I’ve been scouring the internet all weekend, but so far the only answers that come close to what I need are well above my skill level as a beginner programmer.
If there’s a better way to achieve this, I’m open to suggestions!
(Also worth noting that I will need to do this for multiple materials containing different texture sets, so I can’t do anything that can only be unique)