Page 1 of 1

[SOLVED] Multiplayer action like Casa in Perudo.

Posted: 09 August 2015, 23:15
by Rudolf
Hi,
I was wondering if there was a new type of actions in Structure of machinestates...
because with "multiplayer" state type, players "must" play ... and in Perudo, the casa is a player call during a turn...so not mandatory...

Re: Multiplayer action like Casa in Perudo.

Posted: 10 August 2015, 01:41
by pikiou
During an active state any player can send an action. And you can transition to another state as soon as a player sent an action.
If you want to make sure the player is active and the action is allowed for this state, call $this->gamestate->checkAction($actionName).
Otherwise if it doesn't matter if the player is active and the action is allowed for this state, call $this->gamestate->checkPossibleAction($actionName).

Re: Multiplayer action like Casa in Perudo.

Posted: 10 August 2015, 18:41
by Rudolf
Thanks Pikiou :) ...