Set material scalar parameter of different material in one blueprint independently

Hello,

I know how to set scalar parameters in BP but I’m having an issue trying to set mine.

I have one light switch blueprint I use in all my map, but the lights I call have different materials, what I’d like to do is set the emissive color of each material without having to call all of them everytime. Is there a way? Like a global Scalar parameter? I d like to don’t have to call the material everytime but just, if the light I call have this scalar parameter, then fire the event.

Thank you

This is what I managed to do but it dont work, the scalar value don’t change anytime. I have to set the static mesh because I don’t want to have the same lamp all over the map so I don’t know how to call the dynamic instance.

I’ve add a breakpoint at the set scalar parameter nodes and it fires, the problem is probably how I call the dynamic instance, and if I use the first image upper nodes, those not plugged it shows me the dynamic instance mat (image 3) but don’t work better.

230781-d.png