Lets you embed code into your Behavior. Can be used in many ways. Particularly useful for calling functions that Stencyl or Haxe provide but don't exist in block form. Take a look at our API to see what's available.
Lets you embed a fragment of code into a block field.
Returns the URL of the website where this game is running (on Flash, HTML5). Returns an empty text on other platforms.
The language code of the system (device) on which the game is running.
Returns the number of milliseconds in each "step" of the game. This corresponds to the time elapsed between updates to
when updating events. The default step size is 10 milliseconds.
Returns "null", which stands for the absence of a value.
true if the game is running on the selected platform.
#if(PLATFORM) true #else false #end
true if the game is running on the selected kind of iOS device. Useful if you want to fine-tune a game's display or behavior on specific devices.
#if(ios) Engine.isStandardIOS #else false #end #if(ios) Engine.isExtendedIOS #else false #end #if(ios) Engine.isIPhone6 #else false #end #if(ios) Engine.isIPhone6Plus #else false #end #if(ios) Engine.isTabletIOS #else false #end #if(ios) Engine.isIPhoneX #else false #end #if(ios) Engine.isIPhoneXMax #else false #end #if(ios) Engine.isIPhoneXR #else false #end
Include the wrapped blocks only on the specified platform. On other platforms, the wrapped blocks will not exist at all.
#if(PLATFORM) [ACTIONS] #end
Quits out of a Desktop game or standalone Flash game. Does nothing on Flash/HTML5 running in a browser. On iOS/Android, it may send the app to the background (and goes against platform guidelines).
These blocks are deprecated. We now recommend handling atlases entirely using the Atlas page.
Tells the game to load (or unload) an atlas in the next scene. Specify the Atlas ID.
true if the specified atlas (using Atlas ID) is currently loaded.