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.
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]