PB solved involves a question:
Posted: 11 May 2013, 20:54
Hello,
well I just solved a pb that was concerning several things: slide, step and getactiveplayerid...
the way I was coding was not in the right spirit, because I needed not existing thing...
In a sequence, I had a first step selecting a choice of 4 ways game states, with different behaviour. these 4 ways began with an init game step and goes to a step of active player,
First idea was to include code on EnteringState, but after coding, I realise that in js, I cannot get ActivePlayer (because functions return null) in a game state....
So I change solution and goes to php to include a notify that transfers playerid from php (because php can get this activeplayer even in game state), and it solved my pb.
But... at final, I've added more functions (notify, subscribe, ...) only to replace a simple call... why could it be not possible to get activeplayerid when we're in a game state (in javascript file)?
well I just solved a pb that was concerning several things: slide, step and getactiveplayerid...
the way I was coding was not in the right spirit, because I needed not existing thing...
In a sequence, I had a first step selecting a choice of 4 ways game states, with different behaviour. these 4 ways began with an init game step and goes to a step of active player,
First idea was to include code on EnteringState, but after coding, I realise that in js, I cannot get ActivePlayer (because functions return null) in a game state....
So I change solution and goes to php to include a notify that transfers playerid from php (because php can get this activeplayer even in game state), and it solved my pb.
But... at final, I've added more functions (notify, subscribe, ...) only to replace a simple call... why could it be not possible to get activeplayerid when we're in a game state (in javascript file)?