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

[Dev] Getting X Y of 10 ft to where your standing.

Status
Not open for further replies.

swiny

New Member
Joined
Dec 19, 2010
Messages
517
Reaction score
73
Ok, since i really did fail maths in school which is a dumb thing to do since i am a programmer, im trying to get the X Y of say 10FT beside me ( left or right ) but also including where im facing.

so its not just a matter of Y + 10;

Any suggestions.
 
Ok, since i really did fail maths in school which is a dumb thing to do since i am a programmer, im trying to get the X Y of say 10FT beside me ( left or right ) but also including where im facing.

so its not just a matter of Y + 10;

Any suggestions.
Code:
        public static WoWPoint NavMe
        {
            get
            {
                if (Me.CurrentTarget != null)
                {
                    float Distance = Me.CurrentTarget.Distance.ToString().ToFloat() + 10;
                    return WoWMathHelper.CalculatePointFrom(Me.Location, Me.CurrentTarget.Location, Distance);
                }
                return Me.Location;
            }
        }
definitely not proper code, but it should give you an idea of what to do.
 
thanks CNG, Much love. u have saved my ass many times. <3


fixed my movement now pulsing at 200-300 MS,

but now getting this, causing lockup :(
[12:15:27 PM:0] Flushing timed movement. Direction: StrafeRight
[12:15:27 PM:0] Flushing timed movement. Direction: StrafeLeft
[12:15:27 PM:0] Flushing timed movement. Direction: JumpAscend
 
Code:
        public static WoWPoint NavMe
        {
            get
            {
                if (Me.CurrentTarget != null)
                {
                    float Distance = Me.CurrentTarget.Distance.ToString().ToFloat() + 10;
                    return WoWMathHelper.CalculatePointFrom(Me.Location, Me.CurrentTarget.Location, Distance);
                }
                return Me.Location;
            }
        }
definitely not proper code, but it should give you an idea of what to do.

WTF? ToString().ToFloat()? It's already a float! Also, you don't need the distance at all..
Code:
return WoWMathHelper.CalculatePointFrom(Me.CurrentTarget.Location, Me.Location, 10f);
 
WTF? ToString().ToFloat()? It's already a float! Also, you don't need the distance at all..
Code:
return WoWMathHelper.CalculatePointFrom(Me.CurrentTarget.Location, Me.Location, 10f);
definitely not proper code, but it should give you an idea of what to do.

its for show only, i know its not correct.
 
definitely not proper code, but it should give you an idea of what to do.

its for show only, i know its not correct.

If it's for show only then it doesn't fill it purpose. You don't give bad code for show only. You are skilled enough to clean that up, why corrupt a newcomer (no offense swiny) with horrible coding conventions?
 
Status
Not open for further replies.
Back
Top