area(parentArea)

This is the constructor. It recieves the parent area because each area is required to be within another area.

setSize(min, max)

This method sets the size of the area. The size is restricted between 0 to 1.

getSize()

This method returns the size of the area.

setLoc(x, y)

This method defines where the area will be placed. X and Y is restricted between 0 to 1.

getLoc()

This method returns the location of the area in an array: array(x,y).

getCenter()

This method returns the center of the area in an array: array(x,y).

getRandom()

This method returns a random location within the area in an array: array(x,y).

setCluster(min, max)

This method sets the number of area patches (Blob in AOM) to create.

setClusterDist(min, max)

This method sets the allowed distance the patches can be from eachother. Distance is restricted between 0 to 1.

setRadius(int)

This method sets the radius of an area to create a circle.

newVertex(x, y)

This method defines coordinates for a vertex to create a polygon.

rotate(int)

This method is used to rotate the area by a certain amount of degrees (1-359).

preventWalk()

This method prevents units from entering the area.

preventBuild()

This method prevents players from building on the area.

create()

This method registers the area after everything has been configured.

Last modified 16 years ago Last modified on Feb 23, 2008, 4:19:01 AM
Note: See TracWiki for help on using the wiki.