Hello! I’ve been experimenting with some of makecode arcade’s hidden functions, and I’ve made a list of mini extensions and functions for you to use!
Extentions:
Console Overlay
Description:
Using a built in but hidden feature, this extension displays the system console directly on the screen! It’s extremely helpful when you want to directly get values but don’t want to have to manually click on the console button.
Located in the
console
category
Blocks:
Note!
The console overlay only saves the messages while it’s on, meaning that previous messages in the console are not displayed.
Example
Output:
Info +
Description:
This extension expands the
INFO
category, giving you the ability to show/hide the stats, change the life image and customize the stat colors.Located in the
info
category
Features:
- Ability to customize the on-screen life, timer, and score displays.
- Ability to turn those displays on/off
Blocks:
Display:
- Turns the display on/off
- Stats are automatically set to 0 if not previously set
Numbers
- Returns the value of the property
Color
- Sets color of the background/text/border
Set Life Image To
Image
- Sets the life icon
- Recommended icon size:
8x8
Example:
Output:
Functions
String Functions:
Description
These functions are for more advanced uses of strings.
String to uppercase/lowercase
Uppercase:
helpers.stringToUpperCase("lowercase"): void
Lowercase:
helpers.stringToLowerCase("uppercase"): void
String is empty?
Checks if a string is empty, returns true if it is
helpers.stringEmpty("string"): boolean
Replace all
This function finds all instances of to replace
in string
and replaces them with replace with
helpers.stringReplaceAll("string", "to replace", "replace with"): string
Alternatively you can use stringReplace
, but that only replaces the first instance of to replace
Slice
This function gets a substring in string
from start
to end
helpers.stringSlice("string", start, end): string
Another alternative is helpers.stringSubstr("string", start)
, where it gets the letters from start
to the end of string
Search Function:
Description:
These functions search for a specific thing by name. Returns
null
if nothing is found.
Search for song
helpers.getSongByName("mySong")
Search for tilemap
helpers.getTilemapByName("myTilemap")
Search for image
helpers.getImageByName("myImage")
Search for animation
helpers.getAnimationByName("myAnimation")
Search for tile
helpers.getTileByName("myTile")
Thank you to the makecode arcade team for implementing these functions, I’m just showing them to you.
More to come in the future!