How would I go about making a party system with Blueprints?

I’ve been trying to figure it out on my own but I keep running into roadblocks and I feel there might be a simpler way to do this that I am unaware of. I’ve used unreal for a few months now and understand the basics fairly well. I’m trying to build a party system similar to Starwars knights of the old republic where the party members follow the player who can swap to the point of view of the party members. Up goes to character in first slot, left goes to second, right goes to third, down goes to fourth.

I’ve been following this tutorial here: BioWare Party System Tutorial - Unreal Engine 4 - YouTube

The issues I’m facing:

  1. This tutorial implies that the player will start with 4 party members. In the game I’m working on, the player gets them over time so how would I set that up? I thought it would be an integer “Members in Party” that would increase and compare to a second integer “max Party Members” and that kind of works but but because of issue 2 it isn’t useful right now.

  2. The tutorial doesn’t explain how to change the followers character. They’re just different color mannequin clones in the tutorial. How would I modify the blueprints so it would spawn the characters in your party? I thought maybe I could set up some integer as CharacterID, assign each character a number, and then run a check with branches but this seems like it’s over complicated and it just feels like it’s the wrong way to go about it.

  3. There’s a cap of 4 party members at a time I’m trying to enforce but say there were 8 characters you could pick from. How would I set up a check that would toggle which characters are in the party? My thought is to have the controller running on an InParty Boolean that if true would follow player and if false it would go to roaming but it isn’t guaranteed that the main character is always going to be in the party and this would be a headache of code to apply to each and every character having them check each and every character to see who’s the party leader.

  4. I figured out how to bind the arrow keys to each party member but how would I tell the game engine which characters are in the party.

I’m trying to word this best I can any questions needed I can answer best I can. Any help or even hints would be greatly appreciated.

Thank you so much for the insight this was seriously helpful.

With the third question the situation is say there’s 8 party members you could pick from but there’s only four slots available for your party. How would I go about making it so the order the player picks binds the character to that party member slot?

Example: Say Character 5 is in party slot 1 that would make them the “leader of the party” so when you pressed up on the arrow keys the engine would realize that and switch to that character.

Edit: Never mind. I sort of answered my own question using the integers and comparing them in question 1. I appreciate the assistance and guidance.

“1) This tutorial implies that the player will start with 4 party members. In the game I’m working on, the player gets them over time so how would I set that up? I thought it would be an integer “Members in Party” that would increase and compare to a second integer “max Party Members” and that kind of works but but because of issue 2 it isn’t useful right now.”

Yes, this would be a great way to check if you have space available for a new party member

“2) The tutorial doesn’t explain how to change the followers character. They’re just different color mannequin clones in the tutorial. How would I modify the blueprints so it would spawn the characters in your party? I thought maybe I could set up some integer as CharacterID, assign each character a number, and then run a check with branches but this seems like it’s over complicated and it just feels like it’s the wrong way to go about it.”

There are many ways to do this, you could simply spawn a new BP from a class that matches the one you added to your party (via a struct or data or map or enum), you could have a switch that spawns your party member based on an enumerator, integer or even an actor class or you could just have them all spawn at the beginning of the level, but have a message go from your controller to their BP to tell them they are now in your party.

“3) There’s a cap of 4 party members at a time I’m trying to enforce but say there were 8 characters you could pick from. How would I set up a check that would toggle which characters are in the party? My thought is to have the controller running on an InParty Boolean that if true would follow player and if false it would go to roaming but it isn’t guaranteed that the main character is always going to be in the party and this would be a headache of code to apply to each and every character having them check each and every character to see who’s the party leader.”

Im not sure what your question is here, do you want to be able to create multiple parties that have a dynamically chosen leader? I need more clarification on this.

“4) I figured out how to bind the arrow keys to each party member but how would I tell the game engine which characters are in the party.”

I recommend having a player controller hold the information of who is next to be possessed. IE create a player controller that has the input event (lets say up arrow) trigger the possession of character 0, then goes up by 1 until it reaches 3 then goes back to 0.

Youre more than welcome, Im just happy to help. It can be hard if youre new to programming/UE4, Im still learning everyday and need help myself sometimes, just giving back to the community.