Scene > Regions


Read our guide on Regions for an explanation of these blocks.


Get Region

Choose Region

region

Returns a Region of choice (whether an instance of one, an attribute or other form).

[REGION]

Actor is Inside Region?

is-in-region

Returns true if the actor is inside the specified region.

isInRegion([ACTOR], [REGION])

Create

Create Box Region

create-region

Creates a rectangular region with the given location and size. Assign to a Region attribute (using the "Last Created Region" selection) to refer to it in the future.

createBoxRegion([NUMBER], [NUMBER], [NUMBER], [NUMBER]);

Create Circle Region

create-circular-region

Creates a circular region with the given location and size. Assign to a Region attribute (using the "Last Created Region" selection) to refer to it in the future.

createCircularRegion([NUMBER], [NUMBER], [NUMBER]);

Delete

Delete Region

delete-region

Deletes a region from the current scene. (It will return if you leave the scene and come back.)

removeRegion([REGION].getID());

Move

Move Region

move-region

Moves the region to the given point.

[REGION].setLocation([NUMBER], [NUMBER]);

Move Region to Actor

follow-region

Moves the region to the given actor's location using its origin point.

[REGION].follow([ACTOR]);

Resize

Reset Region Size

reset-region

Resets the region to its original size.

[REGION].resetSize();

Resize Circle Region

resize-region1

Sets the size of a circular region to the given diameter.

[REGION].setRegionDiameter([NUMBER]);

Resize Box Region

resize-region2

Sets the size of a box region to the given width and height.

[REGION].setRegionSize([NUMBER], [NUMBER]);

Properties

Position of Region

get-region-pos

Gets the [X/Y] location of the region.

[REGION].getX()
[REGION].getY()

Width / Height of Region

get-region-size

Gets the [Width/Height] of the region.

[REGION].getWidth()
[REGION].getHeight()