I've been finally dipping my toes into the multiplayer front, and I'm running into a small issue with my turn based tank combat game. I can provide my capx if necessary, but it's a little big and I have tons of custom plugins so I want to avoid that if possible
The system I have in place is as follows:
Depending on TankGameState (hostturn or peerturn), the host or peer can click once to shoot a single shell in the direction of the tankbarrel (setting TankGameState to either HostShooting or PeerShooting). If the tank shell collides with the opponent tank, ground, or layout border, it destroys itself and sets TankGameState to either hostturn or peerturn depending on who just played.
The system works on peerturn for both the peer and host, with the peer's shell showing up and responding on both sides. However, on the host's turn, the host shell appears on the peer's window but not the host window, and the GameState doesn't change to HostShooting like it's supposed to, so the host can shoot as many times as they want and the missiles won't detect the collision with the peer tank (because that even only triggers if the state is HostShooting).
Here is the relevant code:
I'd appreciate any help! If you want to peek at the capx, let me know and I'll upload it.