Zombie during multipleactiveplayer?

Game development with Board Game Arena Studio
Post Reply
User avatar
Xom
Posts: 28
Joined: 30 September 2014, 19:21

Zombie during multipleactiveplayer?

Post by Xom »

Is there documentation on implementing zombie behavior for multipleactiveplayer states?
User avatar
Lymon Flowers
Posts: 196
Joined: 01 April 2020, 21:14

Re: Zombie during multipleactiveplayer?

Post by Lymon Flowers »

Personnally, I use the following:

Code: Select all

    function zombieTurn( $state, $active_player )
    {
    	$statename = $state [ 'name' ];
        switch ( $state [ 'type' ] )
        {
        [...]
        case 'multipleactiveplayer':
          $this->gamestate->setPlayerNonMultiactive( $active_player, 'zombiePass' );
          break;
        }
    }
That marks the zombie player as inactive and if they were the last (unlikey, thought), applies the zombiePass transition.

Of course, you may want to place additional game logic before the setPlayerNonMultiActive line.
Post Reply

Return to “Developers”