tozededao
Community Developer
- Joined
- Jan 15, 2010
- Messages
- 1,225
- Reaction score
- 5
I was trying to return the closest monster to the character and I'm not able to do it consistently. Sometimes it works othertimes it doesn't. Here's what I have:
How should I be doing this?
Code:
var closestTarget = CombatTargeting.Targets<Monster>().Where(
m =>
m.Distance < 30 &&
ExilePather.PathDistance(myPos, m.Position, true, !PewPewShatterSettings.Instance.LeaveFrame) < 30)
.OrderBy(m => m.Distance).FirstOrDefault();
How should I be doing this?






