Hello,
well I've got a big pb on which i stump since 3 days.
I've tried to look at it with Firebug, but when i go in dojo with firebug, all the code is displayed on only one line... so it's difficult to trace.
If for example I would like to check what happens in SlideToObject, It's complex.
Is there a better way to go and debug inside this funcitons (have a view of code formated)?
The reason I have to check is that I don't find my problem:
In a case where all the players choose to play an 'eagle' at turn 1, red player put his axe on yellow player,
then all red scouts come back to red player board, prepare to be replaced (because of eagle move).
Then I click on a free place on mountain board, the function SlideScoutFromPlayerBoard is called but nothing is animated and there is no error shown (the database is updated with values, etc..).
This function is moreover used at the beginning of the game and run perfectly during this phase....
I don't understand why it does not run.... the nodes are the right one, it's same bahaviour that in the beginning.... begin and destination are different....
Player is active... it's like play() does nothing...
To reproduce,
you can open a game, then
1) places all the scouts whereever in mountain board (for each players)
2) play eagle moves for each player
3) BLUE play the pipe on an hunter in plain board
4) RED plays the axe on yellow player board (click on the back square in player board)
5) then RED try to place a scout again on mountain board, nothing slides...
Thanks for ideas
well I've got a big pb on which i stump since 3 days.
I've tried to look at it with Firebug, but when i go in dojo with firebug, all the code is displayed on only one line... so it's difficult to trace.
If for example I would like to check what happens in SlideToObject, It's complex.
Is there a better way to go and debug inside this funcitons (have a view of code formated)?
The reason I have to check is that I don't find my problem:
In a case where all the players choose to play an 'eagle' at turn 1, red player put his axe on yellow player,
then all red scouts come back to red player board, prepare to be replaced (because of eagle move).
Then I click on a free place on mountain board, the function SlideScoutFromPlayerBoard is called but nothing is animated and there is no error shown (the database is updated with values, etc..).
This function is moreover used at the beginning of the game and run perfectly during this phase....
I don't understand why it does not run.... the nodes are the right one, it's same bahaviour that in the beginning.... begin and destination are different....
Player is active... it's like play() does nothing...
Code: Select all
SlideScoutFromPlayerBoard: function(zeplayer_id,zenode,index,$scout)
{
if (typeof zeplayer_id == "undefined") zeplayer_id =0;
if (typeof $scout == "undefined")
{
var player= this.gamedatas.players[zeplayer_id];
$scout = player['scoutstock'];
}
var zetempscout = 'scout_'+zeplayer_id+"_"+$scout;
this.attachToNewParent( zetempscout, zenode ); // To keep position behaviour in case of reduce/enhance
this.showMessage('OK it arrives here with good nodes!','info');
this.slideToObject(zetempscout,zenode,1000).play();
},
you can open a game, then
1) places all the scouts whereever in mountain board (for each players)
2) play eagle moves for each player
3) BLUE play the pipe on an hunter in plain board
4) RED plays the axe on yellow player board (click on the back square in player board)
5) then RED try to place a scout again on mountain board, nothing slides...
Thanks for ideas