gamestate mismatch?

Game development with Board Game Arena Studio
Post Reply
User avatar
cmgames
Posts: 16
Joined: 05 October 2016, 22:14

gamestate mismatch?

Post by cmgames »

I am developing 'Asgard'. At a certain point, if the player selects a game piece in a certain place (build temple slot), I transition to a 'game' state to determine what actions the player can take based on available resources and available temples. However, when I try to transition OUT of that game state, I get an error telling me that transition is not valid. But it tells me it is not valid in the 'select piece' state, not the state I am actually in.

With a bunch of debug code, it looks like the php (.game) is in the correct state for the transition, but the javascript (.js) still thinks it is in the old 'activeplayer' state. Is there something I need to do when transitioning states to bump the .js into the right state?

~cmgames
User avatar
Tisaac
Posts: 2736
Joined: 26 August 2014, 21:28

Re: gamestate mismatch?

Post by Tisaac »

I don't understand what do you mean by "transition OUT that game state". Your php function in a game state is supposed to make that transition, so what is inside js is not relevant.
I'm not sure why you need this game state anyway, computing actions looks more like some args of a playerActive state ?
Post Reply

Return to “Developers”