Topdown mouse movement not possible on other pawns other than starting one

Greetings, I am trying to create a topdown game where the player will use multiple characters, one at a time.
Right now am using the posses on get player controller in order to switch between characters.
I have searched some other tutorials and questions around the net, and nothing seems to be quite alike my problem, I have disabled the mouse to touch, enabled click events, enabled input for the possessed character and so on…
The thing is, the mouse movement only works on the first character possessed by the player, when switching character, it stops working and than just works again when switches back to starting one.
WASD controls works fine on any character.

Please let me know if any further information or screenshot is needed.

Yes I think code screenshots are needed

Alright, so this is the char possession function, the topdown character has a variable called “CharIndex” which is an integer and is unique for each character ranging from 0 to 4.
The loop compares the element with the given integer in order to get a specific one and when it does it gives the player possession of such character.
This funcion is called from the GameMode.

This is how the topdown character details are set

When a character is possessed, than it spawns an inventory and set the cursor to visible, when it is unpossessed, it makes the cursor invisible and stops any movement.

I don’t know what other info are needed to screenshot, let me know which blueprints if any more is needed.

In your CharPossession event, I wonder if the array element is out of scope when you break the for loop.
Maybe you need to Promote the current Array element of the foreachwbreak loop to a variable, and set it between the True branch and the Break pin. Then in the nodes after the Completed pin that use that reference, connect them to the variable and not directly to the array element output pin of the foreachwbreak loop node anymore.

That way you can ensure that the Actor reference being used by those nodes after the loop, is in scope and points to an actual actor, and not something that only had a valid reference within the loop.

If that doesn’t fix it then something else is also wrong.

Highly appreciate your answer, unfortunatelly it did not work :frowning:

Hmm then something else is also wrong…

I can’t figure at all