How to swap between characters?

Hey everyone, I created a project using the top-down game template and made 4 child blueprints of the built-in BP_TopDownCharacter.

Here’s the logic I implemented to swap between these characters.

However, it didn’t behave as expected: instead of moving to the last assigned location when swapping to another character, the character stops immediately, and the animation continues playing.
swapping

I’ve been stuck on this issue for a while now. I suspect it could be a controller problem; when I swap to another character, the last character loses the controller, and the CachedLocation is reset simultaneously, causing the last character to stop moving. I’m not entirely sure, as I’m new to this engine.

hey, sorry for my eng, but her a few ideas
looks like you’re trying to make a strategy game? Then, in general, you can avoid possess. inside each unit you can make an AI controller and with your orders make “move to” (check tutors ai + navmesh).
or if you just need an possession… then you can remember each order-position, where you need to move, and when you do an unpossession, then you can fill the unit controller with an ai controller and force the ai controller to continue moving to the desired position (look also ai… bots… navmesh)

Hello there, thanks for sharing these constructive ideas! Yes, I’m working on a strategy game project where players can control up to 4 characters to defeat each level. In my concept, each character would have an AI controller for other behaviors. Therefore, maybe I should avoid possession and focus on swapping the camera only. Using the AI controller could be a potential solution. I’ll give it a shot. Thanks again!

In this way it will be easier to do it through an AI controller, and there will be fewer problems associated with posession. changing the camera and changing the display of abilities, buffs and items when changing the selected character in HUD. Good luck!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.