Hey everyone, I have a bit of a design question.
In my game the player is able to control one of 4 characters and switch between them. I know how to do that, but I don’t know how I should design the system.
The options I’ve considered are:
- Create some sort of (invisible) actor that just stores which character the player is controlling.
- Possess the character the player wants to control and just leave it at that.
- Do the same as 1 but in the Game Mode BP
In Unity I’d go with the first option, but UE4 has so many more features so I thought there might be another option.
Keep in mind that later I’ll need UI and other systems to get information about the controlled character. In situation 1 and 3 I’d just access whichever BP is in charge of knowing which character is being controlled (Game Mode or an invisible Actor) and get a reference to the controlled character. In situation 2, however, I would have a function library function to loop through all Actors that are controllable and return the one that is currently possessed.
I want to know what would be the best way to do this, the more organized and flexible way. Basically a centralized system (1 and 3) vs a decentralized system (2).
Thank you very much for your help!