So, I have four different structures where I could store this information:
- The pawn
- The AI Controller( I control my character through pathfinding, unfortunately )
- The player Controller
- Player state
Where am I meant to store the stats in a MOBA game? The character levels up, has different stats, they can be affected by equipment and other things, and they can have maximums/currents. From what I understand:
- The pawn stores stats that are specific to this instance, such as current health.
- AI Controller should store nothing in this case.
- The player Controller should store non-current stats that are persistent throughout the game( rather than the pawn’s lifetime. ) Because this is shared between the local player and the server, we can store things that need to be replicated for UI purposes here.
- I have no idea what player state is meant for. It’s stored only on the server, so why is it useful at all? Stuff like kills and deaths would need to be replicated to all clients anyway for UI purposes, so why put them here?
Following something like this, I end up with stats being all over the place. I can imagine this would be a huge mess. Can someone explain to me how all this works?