Quote:
Originally Posted by cbk1994
(I think I recall Stefan adding a better way to find players in a certain radius/area? The forums search isn't working as usual so not sure)
|
You mean
findAreaPlayers()?
Scripthelp:
TServerLevel.findareaplayers(float, float, float, float) - returns object - returns an array of all players in the specified rectangle (x,y,width,height), uses the blocking rectangle of players (0.5,1,2,2) instead of (0,0)
Quote:
Originally Posted by cbk1994
edit: I read callimuc's post wrong, he was only talking about for NPCs. You can use point triggers for that but they are still very unreliable. A preferred solution would be to handle NPCs the same way as players (loop through them and use the same attack/hitbox logic; use something like npc.trigger("hurt", player, damage); to call onHurt in an NPC).
|
yea true, that would be the better way of damaging NPCs