Hi
In my game you need to pick a card from a certain pile dependent on the step you are in.
In order to connect to the correct pile, I need to source the global variable "currentStep". However when it moves up, the global variable is not (automatically) updated in javascript.
(going to a new step is a new state)
How do I make sure that in javascript I always work with the actual current value of the global variable?
Best regards
Maurice
In my game you need to pick a card from a certain pile dependent on the step you are in.
In order to connect to the correct pile, I need to source the global variable "currentStep". However when it moves up, the global variable is not (automatically) updated in javascript.
(going to a new step is a new state)
How do I make sure that in javascript I always work with the actual current value of the global variable?
Best regards
Maurice