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

Facing Target

apx13

New Member
Joined
Feb 1, 2012
Messages
15
Reaction score
0
Hello. Can anyone help me?
Wanna make facing target in combat. Im using Me.CurrentTarget.Face(), its facing but also moving hero to the target location. I want only facing without moving. How can i get it?
Thank you.
 
use IsSafetlyFacing, you'll understand the difference when you see it... it's a lot better and doesn't make you look like a bot compared to .Face().
 
.face() shouldnt move him, you should make sure theres no other code actually moving you.
 
.face() shouldnt move him, you should make sure theres no other code actually moving you.
Its not, but when right clicking any where, hero start moving to the target, instead moving to the right clicked place.

use IsSafetlyFacing, you'll understand the difference when you see it... it's a lot better and doesn't make you look like a bot compared to .Face().
Please, can u give me some example, how i can use this?
 
Last edited:
then your code is off, it shouldnt be doing both, moving to and facing at the same time, you need to code it so it hits one, then it hits the other, moving to should be the first code it hits, then returns, so it moves to, then faces.

heres an example of how its done in amplify
Code:
               // Move closer to the target if we are too far away or in !Los
          new Decorator(ret => !AmplifySettings.Instance.MoveDisable && Me.GotTarget && Navigator.CanNavigateFully(Me.Location, Me.CurrentTarget.Location) && (Me.CurrentTarget.Distance > PullDistance - 1 || !Me.CurrentTarget.InLineOfSight || !Me.InLineOfSpellSight),
                              new Action(delegate
                              {
                                  Log("Moving towards:{0}", Me.CurrentTarget);
                                  Navigator.MoveTo(Me.CurrentTarget.Location);
                                  return RunStatus.Success;
                              })),

                // Stop moving if we are moving
                new Decorator(ret => !AmplifySettings.Instance.MoveDisable && Me.IsMoving,
                              new Action(ret => WoWMovement.MoveStop())),

                new Decorator(
                    ret => !AmplifySettings.Instance.MoveDisable && Me.GotTarget && !Me.IsFacing(Me.CurrentTarget),
                    new Action(ret => WoWMovement.Face())
                    ),
the runstatus.success tells it if it was successfull, go back to the root of the tree, so while we arent in range of the target, then its not going to proceed any further in the tree. then the last thing we check is if we have a target and if im facing him, if not then send a face.

make sense?
 
then your code is off, it shouldnt be doing both, moving to and facing at the same time, you need to code it so it hits one, then it hits the other, moving to should be the first code it hits, then returns, so it moves to, then faces.

heres an example of how its done in amplify
Code:
               // Move closer to the target if we are too far away or in !Los
          new Decorator(ret => !AmplifySettings.Instance.MoveDisable && Me.GotTarget && Navigator.CanNavigateFully(Me.Location, Me.CurrentTarget.Location) && (Me.CurrentTarget.Distance > PullDistance - 1 || !Me.CurrentTarget.InLineOfSight || !Me.InLineOfSpellSight),
                              new Action(delegate
                              {
                                  Log("Moving towards:{0}", Me.CurrentTarget);
                                  Navigator.MoveTo(Me.CurrentTarget.Location);
                                  return RunStatus.Success;
                              })),

                // Stop moving if we are moving
                new Decorator(ret => !AmplifySettings.Instance.MoveDisable && Me.IsMoving,
                              new Action(ret => WoWMovement.MoveStop())),

                new Decorator(
                    ret => !AmplifySettings.Instance.MoveDisable && Me.GotTarget && !Me.IsFacing(Me.CurrentTarget),
                    new Action(ret => WoWMovement.Face())
                    ),
the runstatus.success tells it if it was successfull, go back to the root of the tree, so while we arent in range of the target, then its not going to proceed any further in the tree. then the last thing we check is if we have a target and if im facing him, if not then send a face.

make sense?

I dont need all of these "moving closer" and "stop moving", was need just facing. Used WoWMovement.Face() from ur example and its working like i need ^^ Thanks a lot for help!
 
Hello again ^^
Now i want to make cc seek target. Im using code from other cc:
Code:
WoWPlayer unit = ObjectManager.GetObjectsOfType<WoWPlayer>(false, false).
                Where(p => p.IsHostile && !p.IsTotem && !p.IsPet && !p.Dead && p.DistanceSqr <= (10 * 10)).
                OrderBy(u => u.HealthPercent).FirstOrDefault();

            if (unit == null)
            {
                unit = ObjectManager.GetObjectsOfType<WoWPlayer>(false, false).
                	Where(p => p.IsHostile && !p.IsTotem && !p.IsPet && !p.Dead && p.DistanceSqr <= (35 * 35)).
                	OrderBy(u => u.DistanceSqr).FirstOrDefault();
            }
            if (unit != null)
            {
                TargetUnit(unit);
                Move(unit.Location);
            }

But not working or i dont understand how its work.
And wanna get assist - getting target from tank target.
Need help from guru ^^
 
Last edited:
Back
Top