In my game,I have 2 layouts:Open layout and Main layout.In Open layout,i have a button and i want to use this button to set acceleration of a sprite.(i have "speed" global variable in Open layout).So how can i do it?
Develop games in your browser. Powerful, performant & highly capable.
I am not sure what you mean, but global variable will carry on in every layout.
In Open Layout
On pressed button, set GlobalVariable-Speed to [value x]
In Main layout
On start of layout, set sprite acceleration to GlobalVariable-Speed