Private States: Good examples to help debug weird situation

Game development with Board Game Arena Studio
Post Reply
c12h22o11_
Posts: 58
Joined: 03 June 2023, 03:26

Private States: Good examples to help debug weird situation

Post by c12h22o11_ »

I have a weird thing happening in my code and I'm looking for more examples of using multiactive private states. I am in a multiactive private state and transition out of it into an activeplayer state. This succeeds, but in a 2 player game, immediately afterward it goes *back* into the private state on one of the computers (the one who triggered the transition) and not in the other one.

the code i'm running is basically:

Code: Select all

            $this->gamestate->unsetPrivateStateForAllPlayers();
            $this->gamestate->nextState("exitDistill");
the console output for state transitions is:
Leaving state: distill distilledsugar.js:350:21 <-- private state
07:33:22.922 Leaving state: distillMaster distilledsugar.js:350:21 <-- multiplayeractive state and private state master
07:33:22.932 onUpdateActionButtons: selectRecipe distilledsugar.js:376:21 <-- activeplayer state
07:33:22.937 Entering state: selectRecipe distilledsugar.js:313:21
07:33:22.945 onUpdateActionButtons: awaitDistill distilledsugar.js:376:21 <-- back to a private state
07:33:22.945 Entering state: awaitDistill
Anyone have any thoughts about how this is possible?
Post Reply

Return to “Developers”