Page 1 of 1

MultiActive and way to change its mind

Posted: 09 June 2020, 17:45
by Mistergos
Hi there

I have a game where all players need to choose 2 characters. Everything works fine with multiactive if i do not want them to be able to change their mind before the last player validate.

Currently, i have this

Code: Select all

if(/* Everybody have confirmed */)
        {
            $this->gamestate->setAllPlayersNonMultiactive( "init" );
        }
        else
        {            
            $this->gamestate->updateMultiactiveOrNextState('');
        }
This workds and everybody can change its mind.
My problem is hourglass is still rotating and are confused.
Is there anyway i can stop the time to go down and still be able to change my mind?

I tried to make the player nonmultiactive then call the method from js but i have "This is not your turn" message.

Thanks

Re: MultiActive and way to change its mind

Posted: 09 June 2020, 18:25
by Benoit314
I would use $this->gamestate->setPlayerNonMultiactive( $player_id, $next_state ) instead of your if.
It set the player non active and if all players are non active, it goes to the next state.

Re: MultiActive and way to change its mind

Posted: 09 June 2020, 20:30
by Mistergos
You are right from waht you see. I simplified the code. I need this if because i need to select 2 charachters per player. The if is to handle this case.
Anyway, once the player is inactive i have "This is not your turn" message.

But i found my answer now. You just have to remove all the checkAction both in js and php.

Re: MultiActive and way to change its mind

Posted: 09 June 2020, 23:11
by hersh
Replace them with checkPossibleActions.

http://en.doc.boardgamearena.com/Game_i ... yers_input