Hello,
In my game my world is devided into several regions, in which the teams must capture all flags in one region in order to capture the entire region. Currently, I am doing all the calculations like who should be possessing (determined by amount of players from each team), capture progress, etc inside of my flag-actor. The same goes for my region-actor.
So far, this is what my flag-actor is doing:
- Detecting players entering/leaving a fixed collision box around it and updating the amount of players from each team within this collisionbox
- Calculating which team should possess (if team1 has 3 players inside of the collisionbox, and team2 only has 2, team1 would possess. If team1 and team2 both has equal amount of players it would be contested)
- Calculating the progress (If owner of the flag possesses, secures the flag. If attacker of the flag possesses, captures the flag)
- Also stores the variables which returns the owner and possessor of the flag
My region-actor is pretty much doing the same thing:
- Detecting players entering/leaving a fixed collision box around it and updating the amount of players from each team within this collisionbox
- Calculating which team should possess based on the amount of flags they own in the relevant region
- Calculating progress of the possession (Securing, capturing)
- Also stores a variable which returns the owner and possessor of the region
I was wondering what I should use my gamemode for in my case. Should I calculate the progress of possession in the flag- and region-actor or should I do this in gamemode? Should I store my variables which returns the owner, etc of the flags and regions in the gamemode? Etc.
As far as I understand it, gamemodes only run on the server, which means every variable and all information is automatically replicated to all the clients, right? And I don’t yet understand what should be controlled in the gamemode. Could anyone point me in the right direction please?
Thanks in advance
~Stefan