[Beye] CurrentStep.

Game development with Board Game Arena Studio
Post Reply
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

[Beye] CurrentStep.

Post by Rudolf »

Hello;
I know that I can use possibleAction with this.checkAction and check the statename in OnEnteringState, because StateName is a parameter.
But, in Game.JS, Is there any mean to get the StateName (with a function) , outside EnteringState and OnLivingState (In my Click method for example)?
My first Idea was to put a global 'StateName' in Game.Js... But I suppose that OnEnteringState is not Launched on a refresh?
regards.
Rudolf
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: [Beye] CurrentStep.

Post by sourisdudesert »

Hello,

onEnteringState is launched during a refresh, because this is the initialization of a game state. When you put something here, you're sure the code will be executed when the game state is active.

Cheers,
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: [Beye] CurrentStep.

Post by Rudolf »

Thanks :), but is there any function available for that?
Post Reply

Return to “Developers”