Change characters with button?

Hey guys :slight_smile:

I’m making a 2D game with 4 characters and I’d like to be able to switch between them (and move them) in the game after pressing X. How do I do that?

Also, I want to be able to activate their powers after pressing E. Any ideas how to do that?

Thanks :slight_smile:

Hello,

In this case, you can use Player Controller class. This class is designed to handle input and issue commands to controlled Pawns (Characters). However, this is not necessary, because input can be handled in Character class as well.
Please note, that this choice depends on input complexity and gameplay considerations.

If you like to learn more about Player Controllers and Pawns, please go here:

A good place to experiment would be 2D Side Scroller template, which you can find in New Project menu of the Editor.

Hope this helped!