Objects combine most of the assets into a spawnable prop that is spawned by scripts and rooms. As a result, many of the assets should be created before objects.
Objects work differently compared to junk objects, instead of being added to the junk pool, they are used in specific rooms.
"variable = add_object(block type, material asset, width of block, height of block, sprite asset, x offset of sprite, y offset of sprite, health of block, script asset)" or
"variable = add_junk(block type, material asset, width of block, height of block, sprite asset, x offset of sprite, y offset of sprite, health of block, script asset)"
This will store the sprite in memory, to be used by other scripts and functions...
Argument |
Function |
Block Type |
Type of block. (See: Blocks |
Material Asset |
The material asset that the block uses. |
Width of Block |
The width of the block. (Should be base 32, and should not exceed 512 units.) |
Height of Block |
The height of the block. (Should be base 32, and should not exceed 512 units.) |
Sprite Asset |
The sprite asset that the block uses. |
X Offset of Sprite |
The X offset of the sprite sheet. (Determines what part of the sprite contains this object, for efficiency, it is advised that multiple object visuals are on one sprite.) |
Y Offset of Sprite |
The Y offset of the sprite sheet. (Determines what part of the sprite contains this object, for efficiency, it is advised that multiple object visuals are on one sprite.) |
Health of Object |
The starting health of the block, when the block is damaged and the health reaches 0, it will break. (Breakable blocks only.) |
Script Asset |
The script asset of the block that will be run on each frame. (Set to -1 for no script.) |
Junk |
Selecting "junk", or loading the asset in with "add_junk" will make the object a "junk" object. Junk objects can spawn randomly in the level and shouldn't be larger than 64x64 in size. |
BLOCKS
Block Type |
Argument |
Function |
Normal Block |
block |
A normal block, does not have any special function. |
Breakable Block |
breakable |
A breakable block, when the block is hit, it will take damage and be destroyed when the health reaches 0. |
Interactable Block |
interactable |
An interactable block, can be used like puzzle and cash boxes. |
Half Block |
half-block |
A half-block, is not solid to bullets, so it can be fired over. Also, regardless of material type, it is always see through. |
Non-Solid Block |
non-solid |
A non-solid block, unlike other blocks, it is not solid, so it does not block players or bullets. Like half-blocks it is always see through regardless of material types. |
When editing the object in the authoring tools, the tool will look like this...

|