Ive sent up a basic Behavior Tree, that tells an AI NPC to run around randomly.
When i possess the Character, the AI behavior stops.
I want to possess the Character, but i also want the Behavior Tree to continue.
If i drop the NPC into the scene, he does what he does and runs around. But if set it as the Spawned Pawn, he doesn’t do anything. If i switch Characters, the NPC running around stops as soon as i possess him.
Ive tried “Event Possessed” - “Run Behavior Tree” but that doesn’t work.
Any ideas? I think it may have something to do with the Player controller taking over the AI controller.
To help get the ball rolling, by definition possessing the character would mean that the character is no longer being run by AI, which means it is working. Can we get more context into what you are specifically you are trying to accomplish? It may be that possessing the character itself is not the route you need to take.
Any additional specifics you provide may go a long way in solving your problem,
One thing to keep in mind is that you do not need to possed a character to send orders, a clear example is a companion that you order to move or attack.
If you have a reference for the Character in the player controller, you can send him a call for events
After struggling, what ive decided is to use the Spectator pawn. As yeah, i knew the whole possessing thing wasnt right - all i wanted was to get the characters variables display on my HUD.
Now, using SpectatorPawn, i can just call on the AI charactrs class, and pull out the variables.
I always find if i struggle for a day or more on something, im doing it wrong and theres a better way!