Controlling 2 pawns with 2 different controller in the same time?

Is there a way to control 2 pawns with 2 different controllers in the same time? if yes how.if not, is there any alternatives?

Thank you in advance.

Are you asking why you would want to? Only you can answer that.

If it’s a typo and you are asking if there is a way to control two pawns with separate controllers the only thing that I can see that would stop it is if one of the controllers captures the input and the 2nd controller doesn’t see it. I’m not sure.

I think 1 controller is going to have to be the main one, and spawn the 2nd one, and then maybe pass the input to it as it’s handled.

Also, the player start is setup to drop only one character in, so you’ll need to handle spawning the 2nd character, probably off the Begin event of the 1st one makes the most sense, and set your references to it when you spawn.

In RTS games normally the troops have their own controllers, AI that is given orders by the Player Controller.

Are you trying to posses the troops and control them directly?

The problem is i cant stop the first controller because its controlling the camera (RTS Game) and the other controller will control the movement of troops.

If i cant have 2 controllers to work at the same time, is there a way to have my camera and my troops work with the same controller?
and thank you

Yes I’m trying to do that,if it is wrong how i can connect troops to the main player controller?

You posses and unposses the pawns from the controller. It sounds like you only need one main player controller for a start.

If your building up a system, you could switch out sub-controllers that implement an interface and hand the current sub controller the input events so each different type of troop had a different set of controls based on common user inputs. I think that would be easier in C++ than Blueprints because it’s Object Oriented Programming, but maybe it could be done just in Blueprints, not sure.

Unfortunately I’m not an expert in C++, yet ill do my best to accomplish that in BluePrint .

Thank you so much for your help.

It is working now!