Jump to content

IsTaggedByOther


jiraiyasm

Recommended Posts

hi all. as the title says, how do i check if target or object is 'IsTaggedByOther' or if target is being attacked by party/raid member?
Note: target doesn't attack or target at all like Kinetic Bomb.

image.png.d67666c0a6c5c2cf7ee4f0d3817ad408.png

Thank you!

Link to comment
Share on other sites

hello, try something like this,

note this is pudo code (Made from my phone).

 public List<WoWUnit> GetUnitsAttackingPartyMembers()
 {
   var partyMembers = Party.GetParty();
   var units = ObjectManager.GetObjectWoWUnit();

   return units
     .Where(x => x.IsAlive && x.IsAttackable &&
            (x.InCombat || x.InCombatFlagOnly) &&
            partyMembers.Any(p => x.TargetObject?.Target == p.Guid))
     .ToList();
 }

 

Link to comment
Share on other sites

On 9/5/2023 at 5:14 PM, Nax said:

hello, try something like this,

note this is pudo code (Made from my phone).

 public List<WoWUnit> GetUnitsAttackingPartyMembers()
 {
   var partyMembers = Party.GetParty();
   var units = ObjectManager.GetObjectWoWUnit();

   return units
     .Where(x => x.IsAlive && x.IsAttackable &&
            (x.InCombat || x.InCombatFlagOnly) &&
            partyMembers.Any(p => x.TargetObject?.Target == p.Guid))
     .ToList();
 }

 

this checks the units attacking partymembers, it should be the other way around. i want to check if mobId 12345 is being targetted or attacked by party members.

Link to comment
Share on other sites

On 9/7/2023 at 5:20 AM, Nax said:
public List<WoWPlayer> GetUnitsAttackingPartyMembers(WoWUnit p)
  {
  	return Party.GetParty().Where(x => x.TargetObject?.Target == p.Guid).ToList();
  }

 

Thank you for the help!

May I also ask please how to get my character to face it's target? i am trying to make a plug.in that it will stay in a specific position i set and just face the target and use range skills. i am using wrotation and if i set "Manage character movement...." it moves towards it's target. and if wrotation if off, it doesn't face it's target hence not using any range skills. Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...