View Single Post
  #5  
Old 08-20-2013, 04:11 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by cbk1994 View Post
(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 View Post
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
__________________
MEEP!
Reply With Quote