Page 1 of 1

States activeplayer/game.

Posted: 23 August 2015, 16:19
by Rudolf
Hi,
I noticed something : I cannot make a follow of two states with 'activeplayer' status, each time I need to insert a Game State between two activeplayer states to make it run....
I don"t understand why?
When I look on tuto games, it's also like that...
Am I right? why?

Re: States activeplayer/game.

Posted: 23 August 2015, 21:10
by pikiou
Really? I thought you could.
Since you have to be in a 'game' state to change the active player, I automatically add a 'game' state before every 'activeplayer' state to change the active player if needed, so I never noticed.

Re: States activeplayer/game.

Posted: 23 August 2015, 21:22
by Rudolf
each try I did, the brower stays on a record of move in DB witout ending.
So I include each time a game transition (even I don"t change player on states).

Re: States activeplayer/game.

Posted: 24 August 2015, 23:40
by Quinarbre
If you make changes on the DB, maybe there's a problem because of the transactions system (just a wild guess).

Another idea (maybe it's not what you're looking for but still worth mentioning) : did you know you could change state purely on client side, using for instance

Code: Select all

		this.setClientState( statename, {
		    "description" : _('${actplayer} must play a card'),
    		    "descriptionmyturn" : _('${you} must play a card')
		} );

Re: States activeplayer/game.

Posted: 27 August 2015, 11:21
by Rudolf
No Ididn't know, it's a good info :)