Color Swaps Not Working

Hi all! I’m quite new to Blueprints but not a stranger to coding. I’m guessing I have everything right, but for some reason, I cannot get my materials to swap. What I’m trying to do is swap color boolean variables from my GameMode class and apply the materials based on that. I got that part down, but the one simple rule is that there cannot be more than one color active at the same time. So, by putting them all in my GameMode class, the object classes can get other boolean variables and know when another color is active or not. It does it for like, the first time, then it doesn’t switch color anymore.

The other three classes have the exact same network, just with different variables in places, meshes, materials, and input actions. My GameMode class just holds the four variables: isGreen, isRed, etc…If someone could explain why they are not switching properly, that would be great. Thanks!

First thing I’d do is wire up some print strings inside of your FPSGameMode and make sure your bools are what you expect them to be.

Another Idea would be to replace tick with a “Check Color” input temporarily to give yourself some more control.

Taking a step back though: Instead of having 4 of the same BP, I’d try and create 1 BP (or one parent) With the functionality. - Make the Mesh editable, and define color in an Enum (check out the “Switch” node for enums)

Welcome to Answerhub!