MultiActive and way to change its mind

Game development with Board Game Arena Studio
Post Reply
User avatar
Mistergos
Posts: 79
Joined: 18 September 2011, 16:59

MultiActive and way to change its mind

Post 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
User avatar
Benoit314
Posts: 82
Joined: 02 April 2020, 22:12

Re: MultiActive and way to change its mind

Post 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.
User avatar
Mistergos
Posts: 79
Joined: 18 September 2011, 16:59

Re: MultiActive and way to change its mind

Post 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.
User avatar
hersh
Posts: 76
Joined: 12 December 2013, 23:49

Re: MultiActive and way to change its mind

Post by hersh »

Replace them with checkPossibleActions.

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

Return to “Developers”