Hi All,
I’m at a real loss here. I’ve dug through the forums and AnswerHub, but can’t find an answer to what I’m trying to figure out. I feel like this should be simple, but either I’m just not getting something or it’s not as simple as one would think. I have multiple questions, so I’ll try to organize this in a way that makes it easier to get partial answers without confusing everything. Please let me know if more info is needed or something doesn’t make sense. Thanks in advance for the help.
Overview
I’m trying to make a card game, in fact I have one working minus the player setup. Rather simple, just adapting the BlackJack demo to get the cards. I want 4 players with a set of cards each. I’m having enough trouble figuring out how to set up players and start points and all that. So, for the purposes of my post, I’m just looking to understand how to set up a level and Blueprints (no C++ experience so BP only please) to allow 4 players with their own starting location (camera and point + click functionality) and blueprint only they can interact with (had of cards). A deck for dealing and two card piles exist for playing and discarding. As a single player, this all works fine. My issues arise when I try to have multiple players.
- How are Player Start actors supposed to be set up?
I have a table set up with my various actors (Deck, Discard Pile, Play Pile and 4 hands of cards; 1 for each player). I have set a Player Start at each spot on the table. When I start the game in single player mode (just PIE) it randomly chooses which spot to start from. I can’t find any documentation, tutorial or example project that explains how these things work. A good start would be to at least have the single player always start at a specific spot. For pass and play I’d want to have a different controller for each player, correct? How can I ensure that the right player controller is seated at the right spot around the table?
- How doe PlayerControllers work?
To combat the above issue, I was able to replace the Player Starts with Pawns that have empty BP graphs and set the PlayerController 0 to possess the correct one depending on the turn order. However, when attempting this in a multiplayer setting does not work. The second player spawns at a random location and is not using the correct player type. I have DefaultPawn chosen in the game mode, but a spectatorpawn seems to be spawned since I can fly around.
Not sure it’s related, but I don’t understand the ‘Get Player Controller’ node in regards to the various places you can choose to ‘Auto Receive Input’. If I set a Pawn to Auto Receive Input for Player 0, is that the same as somehow hooking up ‘Get Player Controller 0’ to that Pawn? If not, what’s the point of each and how should they be used?
- What’s the difference between a Player Pawn and Player Controller?
When and how should each be used? They seem related, but it’s unclear how and what the best use is for each. There seems to be multiple places to set all of these things and they are named similarly with no real explanation of how to use them. If someone has a link to a good tutorial that explains how to set these things up that would be awesome.
I’m sure I have more questions and probably need to explain things a bit better so feel free to ask me for more info. I can show the BPs I have set up already, but honestly don’t know what to show since I don’t know where to start with fixing this.
Thanks for the help.
Gooner44