Usage
Syntax: level.findareanpcs(float x, float y, float width, float height);
Explanation
Returns an array of NPC objects who are within the specified rectangle. The X and Y parameters typically specify the "top-left" corner of the triangle (where width and height are positive values).
Example
function onPlayerTouchsme() { temp.npcs = findareanpcs(this.x - 5, this.y - 5, 10, 10); for (temp.npc : temp.npcs) { temp.npc.someHurtFunction(10); } }
... Will hurt things within the rectangle.
Categories
CategoryFunctionClientside
CategoryFunctionServerside
There are no comments on this page. [Add comment]