Im trying to create a turn based game. I have one pawn/player character. I have a custom player controller & a custom ai controller.
When the player finishes his turn, I unpossess the player and possess the custom AI controller (I spawn the AI controller by using Spawn all actors of Class).
I’m trying to move the pawn camera (camera attached to a spring arm) from the AI controller’s OnPossess event. It doesnt work. I have used a print node to check all the values and everything is working and all inputs are valid. I tested the same setup by trying to move camera from player controller (before possessing the AI controller) and it works perfectly.
Here is the setup that doesn’t work.
Here is the setup that works…
I have not started creating AI behavior yet. Is this even the right approach?
I’m trying to accomplish the following.
- Player’s Turn - Player makes his move. He can move the camera freely around the central object. He presses U button to end his turn.
- AI Controller Takes Over - Possesses the player character. Moves the camera a little bit to make it look like its thinking. Makes the move. Ends turn and returns the control to player controller.
I’m stuck at the underlined part in the line above.
Any suggestion or pointer would be appreciated!