Hi,
As per the following documentation (https://en.doc.boardgamearena.com/Your_ ... c.php#type), nothing forbids a transition to be done to a "game" typed state.
Doing this :
With such SM :
Triggers the following when transitioning from 2 to 3 :
Changing state getRandomDice type to activePlayer instead of game "fixes" the issue.
Just wondering whether this is expected ?
The "game" state type states is explained as the following but doesn't mention such limitation, and from my understanding is not obvious (but I'm just starting exploring BGA, might be wrong) :
As per the following documentation (https://en.doc.boardgamearena.com/Your_ ... c.php#type), nothing forbids a transition to be done to a "game" typed state.
Doing this :
Code: Select all
ziga.game.php :
function action_waitRoll() {
$this->gamestate->nextState();
}Code: Select all
$machinestates = array(
// The initial state. Please do not modify.
1 => array(
"name" => "gameSetup",
"description" => "",
"type" => "manager",
"action" => "stGameSetup",
"transitions" => array( "" => 2 )
),
// Note: ID=2 => your first state
2 => array(
"name" => "waitRoll",
"description" => clienttranslate('${actplayer} must roll the dice'),
"descriptionmyturn" => clienttranslate('${you} must roll the dice'),
"type" => "activeplayer",
"transitions" => array( "" => 3 )
),
3 => array(
"name" => "getRandomDice",
"description" => clienttranslate('${actplayer} rolling the dice'),
"descriptionmyturn" => clienttranslate('${you} rolling the dice'),
"type" => "game",
"args" => "argGetDiceRoll",
"action" => "st_getRandomDice",
"transitions" => array( "" => 4 )
),
[...]Code: Select all
Unexpected error: Unexpected final game state (3)Just wondering whether this is expected ?
The "game" state type states is explained as the following but doesn't mention such limitation, and from my understanding is not obvious (but I'm just starting exploring BGA, might be wrong) :
Thank you !game (No player is active. This is a transitional state to do something automatic specified by the game rules.)