Private parallel states with change in active players
Posted: 06 May 2025, 07:23
Hello
Here is my problem:
I have 4 players
Player 1 and Player 2 are active players
Player 1 and player 2 are in private parallel state 1, waiting for them to perform an action
Player 1 performs their action => they are moved to private parallel state 2
I'd like Player 3 to also become active and enter the same private parallel state 2
Is there a way to do that?
I tried the following:
in Game.php, in the actAction procedure, I tried to set Player 1 and 3 as active and send them to next state
But I have the following error:
2413805 being player's 3 id
Thanks for the help
Here is my problem:
I have 4 players
Player 1 and Player 2 are active players
Player 1 and player 2 are in private parallel state 1, waiting for them to perform an action
Player 1 performs their action => they are moved to private parallel state 2
I'd like Player 3 to also become active and enter the same private parallel state 2
Is there a way to do that?
I tried the following:
in Game.php, in the actAction procedure, I tried to set Player 1 and 3 as active and send them to next state
Code: Select all
$activePlayers[$idPlayer1] = $idPlayer1;
$activePlayers[$idPlayer3] = $idPlayer3;
$this->gamestate->setPlayersMultiactive($activePlayers, 'transitionToState2');
$this->gamestate->nextPrivateStateForPlayers($activePlayers, "transitionToState2");Code: Select all
Undefined array key 2413805 in /var/tournoi/release/tournoi-250505-1448-gs/www/Bga/GameFramework/GamestateMachine.php on line 1305
Thanks for the help