When clicking the 'Done' button when in a multiplayer state, I perform a function (finishedSelectingCards) and transition to the next state (waitUntilAllDone). In that state action (stWaitUntilAllDone), I set the "done" player to non-multiactive and specify the transition.
My problem is that *each* player gets an error "Unexpected final game state (7)" when he clicks his 'Done' button. And the transition out of the waiting state never happens, even once all players are done.
~cmgames
function stWaitUntilAllDone(){
$player_id = self::getCurrentPlayerId();
$this->gamestate->setPlayerNonMultiactive($player_id, "allDone");
}
7 => array(
"name" => "waitUntilAllDone",
"description" => 'Wait until all players have finished choosing.',
"type" => "game",
"action" => "stWaitUntilAllDone",
"transitions" => array("allDone" => 8)
),
My problem is that *each* player gets an error "Unexpected final game state (7)" when he clicks his 'Done' button. And the transition out of the waiting state never happens, even once all players are done.
~cmgames
function stWaitUntilAllDone(){
$player_id = self::getCurrentPlayerId();
$this->gamestate->setPlayerNonMultiactive($player_id, "allDone");
}
7 => array(
"name" => "waitUntilAllDone",
"description" => 'Wait until all players have finished choosing.',
"type" => "game",
"action" => "stWaitUntilAllDone",
"transitions" => array("allDone" => 8)
),