So I’m thinking in terms of like a turn-based game, where every player takes a turn at the same time, then all enemies take their turn at the same time.
Where each player has their own class they can choose like Warrior or Healer.
In my head, I’m thinking that:
- For 2 players, you have some function where when you take an action, it sends a signal to the gamemode saying that player is ready.
- Once all players are ready, execute actions, end turn, swap to enemy turn.
my question is, how would I go about setting up the conditions for this? I’m assuming I need to be watching variables related to the player controllers, since every post login creates a new player controller. I’ve seen examples of people creating and adding to a player controller array executed off a OnPostLogin. But I’m not sure how to check individual player controllers/who is using them.
I know the first player is always controller 0, and second player is always controller 1. But if I want to create a widget display of their class abilities, or display ally classes/icons on a HUD, how would I go about getting which controller they are?