I am trying to figure out how to switch between characters using blueprints when I press a key. I have read various different posts and noone has really answered the question definitively. I know I need to use a possess and unpossess setup in my player controller but I cannot for the life of me figure it out.
I pieced this together from another post (I know its wrong), and it switches to what seems to be the spectator camera, but I want it to cycle through characters who spawn at the start of the level. Think league of legends if you controlled all 5 characters…
Isnt “Get Player Pawn” will return nothing if you unposses or if 1 is 2nd player does not exist or doea not posses anying? Also i thing you dont need to unposses, just posses another pawn and it will switch to new one
Assuming you store all of your pawns that you would want to possess in an array, here is a setup that should cycle through them in order and loops back to the beginning:
Thanks a million for that. I really appreciate it. Now I just need to figure out how to store pawns in an array and I will update this with a step by step tutorial for future reference, in case anyone else needs to know how.
I’ve managed to create a set up to be able to possess a pawn on overlap, but I cannot figure how to reverse what I’ve done. I set the events on the pawn to be possessed and it works just fine.
However, what I want to do is leave 30 seconds (so I put in a timer) and then have the playercontroller possess the original character pawn, which I had hidden as part of the original script (I didn’t want to delete it as I didn’t know how to recreate it again).
Can you post a screenshot of your setup by any chance? Every time I try to edit my actor array and add my pawn blueprints (My character and MyCharacter2) it is telling me this blueprint cannot be edited. I cannot add references to the pawns either. Stumbling around in the dark here…
Here are a couple of setups you could use based on if you are spawning your Pawns at runtime or if you have them already placed in your level–either one of these would get them into an Array:
Will this set up work to be able to switch between a character controller and a pawn? I’m trying to make a third person character change to a ball at button press and from ball back to third person character.