How do you change static mesh material through BP

I’ve got a box that’s a simple static mesh, I’m trying to change its colour from grey to orange on trigger activation by the player, how is this done?

Is there an easy fix?

Would appreciate some help.

Thanks guys

You can use the Set Material node to change materials at runtime.

So I just wire this to a static mesh reference and select the required material from the node?

If so that’s great and got me out of a humdinger of a mess!

Many thanks unit!

Yupp, and make sure the material element index fits (usually just the default).

I’m sorry for the hassle, but can this be done from the level bp as that’s where my triggers are

Yes, just cast to the actor reference and set the material.

Many thanks!

Can I just ask one more thing for some reason my static mesh has 2 elements in its materials, is there anyway I can get the set material to reference both?

Or is it possible to delete one of the elements in the mesh as I cant seem to be able to do this?

Either set two nodes with both required materials and their element index (0 and 1 for the second), or try and set material, but leave the second material node selection empty.

Many thanks I got it working, you’re the best!