Scenes > 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?

actor is inside region

Returns true if the actor is inside the specified region.

isInRegion([ACTOR], [REGION])

Create

Create Box Region

create region at x number y number with w number h number

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 at x number y number with radius number

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 to x number y number

Moves the region to the given point.

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

Move Region to Actor

make region follow actor

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

[REGION].follow([ACTOR]);

Resize

Reset Region Size

reset size of region

Resets the region to its original size.

[REGION].resetSize();

Resize Circle Region

set diameter of region to number px

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

[REGION].setRegionDiameter([NUMBER]);

Resize Box Region

set size of region to w number h number

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

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

Properties

Position of Region

x of region

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

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

Width / Height of Region

width of region

Gets the [Width/Height] of the region.

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