Posts

Showing posts with the label back button

Android back button usage in Stencyl

Image
By default the back button of Android device sends the active application to back. However, in many mobile games back button is used e.g. to return to the menu (or any equivalent action). This is possible in Stencyl also, but you have to configure the behavior first to match your needs. Here are simple steps to do it: Go  Settings -> Mobile -> User Input Activate " Override Back Button ". This makes back button to act like escape key Go Settings -> Controls . Check escape key bindings (name: Escape, Key:Escape) Open your game scene and go to "events" tab (or edit behavior) Create keyboard event for escape key, as shown in Figure1 below ( Add Event -> Input -> Keyboard ). Set control as "escape". Add transition block and fill in your menu scene name + other required information Figure1: Keyboard event for escape key That's it! Now you can exit from your play scene to menu screen.  But wait, did you forgot...