[Solved] activeplayer and multipleactiveplayer at same time

Game development with Board Game Arena Studio
Post Reply
0BuRner
Posts: 12
Joined: 13 April 2020, 17:00

[Solved] activeplayer and multipleactiveplayer at same time

Post by 0BuRner »

Hello,

I'm coding the game https://boardgamegeek.com/boardgame/157 ... n-ratscrew.
- In this game, there is a player that has to play a card. But at any time, another player can interact with the game by "slapping" the pile, or trying to play a card even if it's not its turn (which result in a penalty for him).
How can I manage this "multi-state" ? Do I have to set in multipleactiveplayer and manage myself the one who can play his card, or go with activeplayer and find a solution to permit action from other players ?
Is it even possible ?
- Another issue with multipleactiveplayer is the timer, is it possible to disable it ? Because this is a game of speed, if a player doesn't react he will obviously lose at one point.
- Also, is it possible to block the game to be play "turn-based" ? Again because this has no-sense with this game...

Thanks in advance,
Last edited by 0BuRner on 18 April 2020, 19:16, edited 1 time in total.
User avatar
apollo1001
Posts: 191
Joined: 21 July 2015, 10:41

Re: activeplayer and multipleactiveplayer at same time

Post by apollo1001 »

You should be able to leave it as an activePlayer state, but others can but in (e.g. SOLO). You will not be able to use the checkAction() command though as that will complain that the interrupter is not the active player: you would need to use getCurrentPlayer() instead to get their player_id.
0BuRner
Posts: 12
Joined: 13 April 2020, 17:00

Re: activeplayer and multipleactiveplayer at same time

Post by 0BuRner »

I already tried your solution apollo1001 and thought it wasn't working, but I indeed forgot to remove the checkAction client-side (I did it only server side).
It's working now, thanks !
User avatar
Benoit314
Posts: 82
Joined: 02 April 2020, 22:12

Re: activeplayer and multipleactiveplayer at same time

Post by Benoit314 »

I had the same issues in my game (Hellapagos). I had 2 kind of actions, the ones you do on your turn, the ones you do whenever you want...

For the second kind of action, I used:
In .js:

Code: Select all

this.checkPossibleActions('playCard')
In php:

Code: Select all

$this->gamestate->checkPossibleAction('playCard');
(For the first kind, I use the normal checkAction functions)
Post Reply

Return to “Developers”