I have a selection of characters that a player can play as (and that are all spawned in regardless of which one the player is controlling), but I’m trying to figure out how to actually assign the player to a specific one. My first instinct would be to assign a “Player Character” integer or something like that to the Player Controller and then use that to determine which character to possess through a Switch on Int and cast to the relevant character, but that’s not working. No matter what I do, possessing a character never puts me in control of it and instead just gives me a static camera pointed straight up at the sky. (Doesn’t help that I’ve taken a break from UE4 for a few months now and forgotten almost everything. :') )
empty the map. Spawn all Pawns inside GamemodeBp and store a variable to each. and switch on any variable you like. get player controller then posses .Be sure to implement logic in a Bp like GameMode Or PlayerController but never in pawns.
I feel so stupid, but… How do I spawn characters from a blueprint…? Nothing I’m doing is working, they never spawn. :') I take On Gameplay Start, Spawn Actor from Class (I’ve tried it in my Game Mode, in my Game State, in my Player Controller, and in my Level BP), select my character’s BP, and then I either manually put in a transform or pull one from a Player Start, but nothing happens.
Also, looking around I’ve found that a potential problem is that I’m wanting to possess Characters, not Pawns (and I know Characters are subclasses of Pawns, but there’s been instances where I just could not get a Character pin to connect to the In Pawn pin of the Possess node). I thought about shifting over to Pawns, but then I lose out on some functionalities that come pre-built into Characters.
I’ve looked up so many tutorials about character spawning and character swapping and everything that seems remotely related, but nothing’s worked yet…
I hate that I forgot to do that. LOL Turns out that, yep, a lot of events simply weren’t firing for whatever reason. I also found out that my issue with connecting a Character pin to a Pawn pin was that I was actually trying to plug in Actors, so I had to use my spawned actors to cast to the appropriate Character BPs and then possess them. It’s some pretty spaghetti-looking stuff, but it’ll do for now.