Variations on this question have been asked, but I couldn’t find anything close enough to my setup to help me.
I’m prototyping a multiplayer, vehicle-based, third-person shooter in Blueprint (local multiplayer only for now) in Unreal 4.2.1. I’ve got functioning player controllers, ammo pickups, projectiles, etc., and now I’m trying to figure out how to handle indexing/IDing of multiple player controllers. There are two specific issues I’m trying to resolve:
1 - Our game’s HUD has health and ammo indicators that need to be unique for each player. Right now I’m using functions built into my player controller Blueprint to cast them to the HUD, where I use a series of conditionals to check the player variables and display the appropriate textures on screen. They’re fully functional when it’s just me driving around the map, but now whenever I shoot another instance of the character Blueprint, it detracts a health counter from my HUD. I’m pretty sure the reason is because the instances of the character Blueprint are all pawns/whatever the correct term is of the main player controller class, so I tried adding a proper second controller via the gameplay Blueprint. No luck, and while everything else works correctly, it still alters my HUD when I shoot another player controller. How can I make it so that my HUD is tied exclusively to my player controller?
2 - I have the player controller fully set up for mouse and keyboard controls and a 360 controller. Again, it all works fine for one player controller, but now I don’t know how to control the second (or third or fourth, when that time comes). For the immediate future, I’m trying to make the mouse and keyboard controller Player 1 and the 360 controller control Player 2. The control setup is pretty sloppy for right now (this is a pretty sloppy prototype, TBH), with movement controls being defined in Inputs in the engine settings and actions being defined in the character Blueprint, so I may need to go back and rework those depending on the situation.
This is being done for a prototype that’s due for a class tomorrow, so temporary workarounds that might not work for more than two players are acceptable for right now, though I’d prefer to get it set up where I can add more players.
