Make interface screen button interact with other entities.

I have been looking for a while but I haven’t find anything helpful. I’m trying to make a selection screen and I need to make that every time you press the Next button it shows a new character. I fail at making the button in the actor interact with the other entities. Any tip or guide of how to do this?

Thanks!

Thanks for the answer. I have a character with the camera pointing to a wall where the actor (the player selection screen) is standing. The idea is that if the player press next the actor is destroyed and replaced for another actor. I need the button to link with this actors, but I don’t know how.

Use interfaces, and make sure that the interface is implemented on both ends of the communication line. Without knowing more about what you are doing, it is hard to say.

There are a few ways of doing this. You can very easily talk to other entities by casting and calling functions. Here is an example from my current project. This is in a Widget blueprint:

As you can see, when the boost button is clicked in the widget, we get the player pawn, cast it to our player pawn class and call the function “mobile boost” (located in my “FlyingPlayerPawn” blueprint). Super easy stuff :).

You can also most likely use an interface like RAVaught said.

Hope this helps! I know this is confusing at first glance.