What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Monsters in Proximity

Mrydeen

Member
Joined
Nov 9, 2014
Messages
59
Reaction score
0
Anyone figured out how to write a code to detect monsters in Proximity?
 
Anyone figured out how to write a code to detect monsters in Proximity?

Query the GameObjectManager with the restrictions that you are looking for. Plenty of Combat Routines have code that does this that you can look through.

From Magitek:

Code:
target =
                            (from unit in GameObjectManager.GetObjectsOfType<BattleCharacter>()
                             where unit.Location.Distance(Core.Player.Location) < Magitek.WindowSettings.TargetDistance
                             where unit.ObjectId == (selection.GameObject as BattleCharacter).CurrentTargetId
                             select unit).FirstOrDefault();
 
Back
Top