region_find(STRING* name, VECTOR* pos)

Finds the region belonging to a certain position. Regions can be placed in WED by clicking Add Region, or by calling region_create.

Parameters:

name - STRING* to be set to the name of the found region, or NULL for returning a temporary string.
pos - position to be checked.

Returns:

NULL if the position is not inside any region, otherwise a STRING* with the region name.

Speed:

Medium.

Edition:

A8

Example:

STRING* name = "";
if(region_find(name,my.x))
  printf("Entity in region %s!",_chr(name));

See also:

path_set, region_set, region_check, region_create, region_get

► latest version online