How can I toggle between two Player Controllers

Hi,

I’m building a top down RPG with the top down template that works fine as a point and click game. I would like for the players to be able to choose between a point and click and a wasd/gamepad control system (like playing diablo 3 on consoles) but I am lost as how to do it.

I don’t want both to work at the same time, so I thought of making a second Controller BP and then creating an
input to toggle the active controller.

I’m simply not sure as to where I should call the toggle (I guess its in game mode?) and what is the name of the
node that sets the player controller.

If it’s not possible in blueprint, can someone point me to the place in c++ where I can play with this?

Thank you all!

There is this but i really douth this will work as this is not what it was intended to do and there only one PlayerController for each player

You could try switching that controller by switching pawns, that might be a lot easier

It might also be easier to use a state machine to control the characters input type in one controller. Have one state for top down and then another one for gamepad/WASD. If executed correctly they won’t work at the same time. It could get a lot messier managing the game with two controllers.

Thanks to both of you.

I will try different ways of doing that to see which one fits best.

Also as a bonus I would like to see if it is possible to switch control schemes on the spot by pressing a key from a different control setup, like it does in The Witcher 3 (not made in Unreal) and in Vampyre (made in unreal) if you press a key on the keyboard or mousse and then when you press a key on the gamepad. Vampyre proves that its possible to do it in Unreal but I can’t find any literature on their controls setup.

The way I handle it is that I just have the input events from all types of controllers possible, on the same class, but use enum Switch or Branch to control whether they do anything. So if GamePad is selected as the control type, its Input events will continue forward and do their thing, but if Keyboard is selected then only its input events will continue. They’re all going to fire, but only some will get past the initial branch or Select node.

For this to work, the Input Mappings in your project settings have to map to separate Input events rather than putting the gamepad ones in the same event as the keyboard ones.

Wow thank you!

That seems like an easy way to handle this! I will surely give it a try!