Extra Utilities Extension
This is a little extension I (originally) wrote in an hour, with a few blocks I've found myself wanting several times. If you have a block you'd like to have handy, tell me and I'll see if I can add it in.
I know that all of the blocks (unless marked otherwise) work on Flash, HTML5, Windows, and Cppia, and they should work on everything else.
(If you can test this extension on Mac, Linux or Mobile, please tell me how it works!)Designed to work with Stencyl v3.4+. Some blocks may not work with Stencyl v3.3 or below.
Features- if ___ then ___ else ___
- ___ is an actor/a number/text...
- get/set scene value
- exit game (Desktop & Mobile)
- copy to clipboard (Flash)
- save/load game with custom name
- repeat (x: __ y: __ ) times
and a few more...
Download for 3.4+(
How to Install and Update an Extension)
(Legacy downloads:
3.2,
3.3. Please note that these are no longer being maintained.)
(
View on GitHub)
If upgrading from the 3.2 or 3.3 version of the extension:1. Install the extension as usual. Note that it will not overwrite the 3.2 version, resulting in two versions of the extension in your folder.
2. For each game you want to upgrade:
a. Open the game.
b. In the Extensions settings, disable the "Extra Utilities 3.2" extension and enable the "Extra Utilities" extension.
c. Save and close the game.
DO NOT open any resources before closing. d. Reopen the game. It should now have successfully upgraded.
BlocksWorks just like the if/otherwise wrappers, but returns a value instead of running code. For example:
Can be shortened to:
You can even use multiple if/then blocks inside of each other, which works the same way as using if/elseif/else blocks.
Another little shortcut block I wanted.
(a = either b or c) is equivalent to
(a = b or a = c).
Returns whether the input is of the selected type.
Note: There are some limitations with this block.
Animations and controls are both stored internally as strings (i.e. text), so "abc" will return true with both.
Also, colors are stored as integers, so 0 counts as a valid color (black).
Shaders are not included at all because anything will return true as a shader.
The map option will always return false, due to an unresolved bug.This block turns any number into an integer (whole number) using
Std.int.
Gets and sets the update speed, in milliseconds, at which the game engine is running (how often physics are updated and When Updated events are run). For coders, this is equivalent to
Engine.STEP_SIZE. The default number is 10 (100 fps). Set to a lower value to simulate fast-forward, such as in the Tower Defense games, and a higher value to slow the game down. Does not work with values less than 1.
These blocks work just like the actor value blocks, but stores the values in the scene. This allows you to access values, no matter how many actors you have. (Secret: this actually stores the values as actor values, but on the permanent actor representing the camera.)
Sets the system clipboard, accessed with Ctrl+V. Unfortunately, only works on Flash.
Saves/loads the game's save file with a custom name (the default is 'mySave'). Useful for having multiple save files, or default Game Attribute settings.
Works just like the built-in loop block, but works over a 'grid'. This allows you to easily create grid-based structures, or loop over sections of the scene with the Tile API.
Version History2.0.1 (03/03/18)
Fixed a bug causing the game to crash on desktop targets when attempting to save the game with a name containing a space.
2.0 (03/03/18)
Updated for Stencyl 3.4 and 3.5 beta.
Re-added engine speed blocks.
Removed exit game, null, and blank text blocks, as these are now built in.
1.3.1 (02/15/15)
Several blocks now have icons on them, to match the built-in blocks.
Fixed a few unsupported features in the 3.1 version.
1.3 (02/14/15)
Added a 3.3 version, and mostly fixed the 'anything is' block.
Added blocks:
- get/set scene value
- exit game (Desktop & Mobile)
- copy to clipboard (Flash)
- repeat (x: __ y: __ ) times
1.2 (12/12/14)
Updated to 3.2.
- if/then/else block changed to yellow
- save/load succeeded block combined into save/load wrapper
1.1 (11/04/14)
Added blocks:
- ___ is an actor/a number/text...
- __ as int
1.0 - Initial release (10/02/14)
Blocks:
- if ___ then ___ else ___
- ___ = either ___ or ___
- blank text/null
- get/set update speed (step size)
- save/load game with custom name
If you have any questions, problems, or suggestions, feel free to post them!
ETH