View Single Post
  #14  
Old 11-21-2003, 10:33 AM
kai_shadowbane
Sarnak
 
Join Date: Sep 2003
Posts: 67
Default

An idea, tho dunno how you would do it.
Right now it looks like you're checking aggro on everything.
Could you check aggro radius on the player or moving mobs instead after the initial startup or respawn check?

Like keep a list of what's in range of the moving mob or player, that way you would only have to reference what's in range, you could handle less things at once.

Like say it's a small zone (for example) and there are 45 mobs. the mob aggro ranges are 100, 45, and 30. So when the player enters the area, he checks for mobs in range 100, 45, 30 and so on until he gets in range of a mob. Then it runs the aggro check to see if that specific mob would attack.

That way, instead of referencing all the mobs, you'd only have to reference those that are moving, and the players. (Since if the mob isn't moving, it's not going in range of anything unless it's coming to them.)
__________________
The downside of being better than everyone else, is that people have a tendancy to think you're pretentious.
Reply With Quote