Search found 89 matches

by stefano
19 October 2020, 10:33
Forum: Developers
Topic: Help - checkAction not working properly
Replies: 18
Views: 2359

Re: Help - checkAction not working properly

Step 2 is a game state, so I guess no player should be active, right? How can I check if the action is possible then? I want to prevent that the javascript function is called twice, cause sometimes, randomly, I get invalid state transition "PlayersTurn"... it seems that the function is cal...
by stefano
19 October 2020, 10:29
Forum: Developers
Topic: setAllPlayersMultiactive not working properly
Replies: 6
Views: 767

Re: setAllPlayersMultiactive not working properly

I added descriptionMyTurn and now I can use setAllPlayersMultiactive and setPlayerNonMultiactive!!! I now transition to state "4" only when all players play the card!! Well done thanks!! Still I got error on the state "4". I tried to add: function stResolvecards() { $this->gamest...
by stefano
19 October 2020, 08:17
Forum: Developers
Topic: Bundle lang_mainsite error
Replies: 7
Views: 888

Bundle lang_mainsite error

Hello, how can I remove this error? ly_studio.js:2 Bundle lang_mainsite has not been loaded (for string Loading game art) getTranslation @ ly_studio.js:2 __ @ ly_studio.js:2 setLoader @ ly_studio.js:2 completesetup @ ly_studio.js:2 (anonymous) @ snowtime?table=192288:2104 _ce @ dojo.js:8 _37 @ dojo....
by stefano
19 October 2020, 08:12
Forum: Developers
Topic: setAllPlayersMultiactive not working properly
Replies: 6
Views: 767

setAllPlayersMultiactive not working properly

I'm trying to configure a multiplayer turn, where all players must play a card simultaneously. This is my code: State Machine: 3 => array( "name" => "Playacard", "description" => clienttranslate("Play one card"), "type" => "multipleactiveplayer&...
by stefano
19 October 2020, 08:05
Forum: Developers
Topic: Help - checkAction not working properly
Replies: 18
Views: 2359

Help - checkAction not working properly

I've some issue with checkAction function. I want to test if the possible action is allowed, but even if the state machine seems to be configured properly, it replies with a popup saying... "This is not your turn" This is my code: State Machine: 1 => array( "name" => "gameSe...
by stefano
16 October 2020, 11:40
Forum: Developers
Topic: How to implement a common step where I need to roll 2 dice
Replies: 5
Views: 616

Re: How to implement a common step where I need to roll 2 dice

Working now... the trick was to do it into the "st" function and not in the "arg" one... I used one single state in the machine, passing the value from st to arg function using the global labels
by stefano
16 October 2020, 10:49
Forum: Developers
Topic: How to implement a common step where I need to roll 2 dice
Replies: 5
Views: 616

Re: How to implement a common step where I need to roll 2 dice

I'm using this member, but I'm getting different results for the players: function argPlaceFruit() { $result1 = rand(1, 6); $result2 = rand(1, 6); return array( 'diceresult1' => $result1, 'diceresult2' => $result2, ); } 2 => array( "name" => "PlaceFruit", "description" ...
by stefano
16 October 2020, 09:33
Forum: Developers
Topic: How to implement a common step where I need to roll 2 dice
Replies: 5
Views: 616

Re: How to implement a common step where I need to roll 2 dice

Would you mind giving me some snippets of code?
by stefano
16 October 2020, 07:41
Forum: Developers
Topic: How to implement a common step where I need to roll 2 dice
Replies: 5
Views: 616

How to implement a common step where I need to roll 2 dice

Hello, where can I read an example of creating a common initial step where I need to roll 2 dice and position 2 tokens depending on the result of the dice? The roll must be common to all the players, un-repeatable (e.g. if I press F5) and the result must be applied to all players. I'm trying to impl...

Go to advanced search