How to change materials? (clicking objects)

Hi!, I am using the default player start with a character blueprint in its default pawn class.

I need to click with mouse on some objects and change its materials in standalone mode.
I don’t need menu, only need the materials change by loop every time I click any object.

All tutorials are very confused for me because I try follow it, but nothing works. I click some object and nothing happend.
All videotutorials are different and don’t explain what I’m searching for.

I don’t know programming and this is specially difficult to me.

So many days trying solve it.
I’m frustrated now.

Could anyone bring me a little help?

Thank you friends.

Hi again. Update.

This scheme works for me, but there is an error.
I can change the materials of a single object. I can apply this scheme to other static meshes but it only works in the first.

The other problem is that no matter where I point with the mouse… the object’s materials always changes when I click anywhere on the scene.

I think the meshes doesn’t detect my mouse, but I have a raytrace blueprint and I can see a print string with the name of all objects I touch…

0fc2416cf566f6e79ac5641b28117f7550fa0f7e.jpeg

I’m not certain, but I think that if you have several of the same class, all enabling input from the player controller, only one - the last one, to run it will receive input. Player Controller is intended to only control one pawn at a time.

First of all, you say you want to change the material when you click on the actor(?), with the mouse but you don’t seem to actually enable that. First of all, set up general input in the player controller. Then, after begin play, add the nodes “set input mode game and UI”, “set show mouse cursor” and “set enable click events”, alternatively check those boxes in the player controller default options.

Then, on the actors you wish to change the materials of, you can add different events, but you need to have a component with collision, such as the capsule component of the thirdpersoncharacter blueprint. You’ll find the events at the bottom of the details panel, not the “my blueprint panel”.

You should downloads Epics content examples because, apart from them all being very teaching, one shows how you how to do exactly this.

Thank you for your suggestions ste1nar, I’ll download the examples.

Start a new project, with the “puzzle game” template. It changes color of objects when you click/touches them.
You can then pick apart how that works (not that hard – it’s a per-object event for being clicked.)

Thank you jwatte, I got to change the materials finally.