How to compare two dynamic materials?

i need help to solve problem how to compare two dynamic materials which one has got different parametr.
I’ve got comparing macro, which is comparing colors.
Also in game mod i got blueprint which may compare these dynamic materials.
Game is spawning actors, with one of random listed colors.

When i hit a spawned actor, when the determinat ( this is only one actor in game, which is changing his color ) is in the differenet color as spawned actor, the game ends, when spawned is the same, as determinat, the game is still go on. But this is that problem, the game always ends, even the colors are the same.

I don’t know what is wrong, but i think is something in my blueprint, because when i was comparing one dynamic material, to one defined color ( np. black, or white) it was working perfect. Now it isn’t.
I really needs help, thanks for your patient and time :slight_smile:

“GetVectorParametrValue” must be something connected earlier, and which thing i need to connect to color1 paramet?

I’m not sure if this is intended in your screenshot where you show comparison. the 2nd MID seems to be getting the parameter of Color1 instead of Color.

as with all problem , I would encourage you to output the information on both color , see if the ‘Gets’ are behaving as intended first, the diagnose the situation.

Anyway an alternative I could suggest is to store the random integer somewhere and use that compare , seems a bit more organized doing that.