GetObstructingPerson

From Spheriki

Jump to: navigation, search

Return the name of the person obstructing the specified person at the specified coordinates. If the given person is not obstructed at the specified location, this returns an empty string.

Contents

Usage

string GetObstructingPerson(name, x, y);
  • name The name of the person to check obstruction on.
  • x X coordinate on the map to check for obstruction. Sphere will act as if the defined person was at this location instead of where ever it may be now.
  • y Y coordinate on the map to check for obstruction.

Examples

Check obstruction at the player's coordinates and abort with the obstructing person's name (if any).

var person = GetObstructingPerson("player", GetPersonX("player"), GetPersonY("player"));
if (person != "")
  Abort("The player is overlapping " + person);

Notes

Will ignore any person set in the specified person's Ignore List.

See also

Personal tools