Configuration options

Hi, i have a question.

If I had an object, moving at X speed, where its valor is 0 by default, and I want the user to change that number, from a configuration page, what’s the best way to achieve this?

I’ve thought about the configuration button on android devices, it opens a native menu where “Configuration” option opens another native android page (with alpha = 60% or so, so you can see the game on the background) where you can change X from 0 to 10 with an horizontal scroll bar.
Is there an easy way to do this by native api? Any thoughts about this?

Thanks a lot in advance, help is really apreciated. [import]uid: 108461 topic_id: 28856 reply_id: 328856[/import]

There isn’t a native api for this but if you have an options menu you would save the value (or make it global, though most people would save it instead for future game play) and then load it from within the scenes/screens it was needed it. [import]uid: 52491 topic_id: 28856 reply_id: 116310[/import]

Peach, thanks for the reply.

Yes, i’ll be using a variable to store the speed value.
My question is: whats the best way to make a button to change it? I’m having problems doing the UI, like a “Set the speed” button (inside the game screen) wich goes to a config scene where you choose from 0 to 12.

I could do the other scene with the director module, but how can people chose between the desired speed?

Thanks again.
[import]uid: 108461 topic_id: 28856 reply_id: 116354[/import]

Hey,

Ah I see - sorry, the most common issue people seem to encounter with this is having the value accessible between scenes.

If you want a button in the game to do it you’d probably use a pop up rather than a scene change as the game could be interrupted unless you save the state. Perhaps in your pause menu then simply do a full screen display group so it looks like a new scene but really is just hiding the game?

Then I suppose a button for down and one for up with the value of the current speed displayed above or between them.

Peach :slight_smile: [import]uid: 52491 topic_id: 28856 reply_id: 116416[/import]