Region object

The Region object allows you to access the properties of your scene's regions. Regions can be queried by using the Scene.GetNode method.


Methods

Point manipulation
AddPoint Adds a new point to the region.
InsertPoint Adds a new point to the region.
SetPoint Changes the coordinates of a point of this region.
RemovePoint Removes point from the region.
GetPoint Queries one point of the region.

Attributes

Type (read only) Returns always "region"
Name The internal name of the region
Active Specifies whether the region is active
NumPoints (read only) Returns the number of points of this region
Blocked Specifies whether this region is blocked
Decoration Specifies whether this is the "decoration" region
Scale The scale factor of this region
AlphaColor The alpha color of this region
SaveState Specifies if the region remembers its state after the player leaves the scene

Low level events

ActorEntry Some of the actors just entered this region.
ActorLeave Some of the actors just left this region.

AddPoint(X, Y)

Adds a new point to the region.

Parameters

X
The X coordinate of the point
Y
The Y coordinate of the point

Return value

Returns true if the method succeeded.


InsertPoint(Index, X, Y)

Adds a new point to the region.

Parameters

Index
The index where the new point should be inserted
X
The X coordinate of the point
Y
The Y coordinate of the point

Return value

Returns true if the method succeeded.

Remarks

If the index is higher than the number of points already present in the region, this method fails.


SetPoint(Index, X, Y)

Changes the coordinates of a point of this region.

Parameters

Index
The index of the point to be modified
X
New X coordinate of the point
Y
New Y coordinate of the point

Return value

Returns true if the method succeeded.


RemovePoint(Index)

Removes point from the region.

Parameters

Index
The index of the point to be removed

Return value

Returns true if the method succeeded.


GetPoint(Index)

Queries one point of the region.

Parameters

Index
The index of the point to be queried

Return value

Returns an object which provides two properties, X and Y.