Problem with distance

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Wed Sep 24, 2003 2:02 pm

I am not standing over my target. I played around with /echo $target(distance) alittle more and it seems to only go physco on me when the mob is moving, and when the mob is somewhat close to me (like within 300), If the mob isnt moving then it seems to put out the correct value everytime

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Wed Sep 24, 2003 2:09 pm

Heya... I looked at the code for distance and posted what I thought in the Development:General Discussion Forum.

If you compile MQ yourself you can look at what I posted and give it a try. What you say as far as the moving mob messing with distance fits in with what I am saying in the post.

Scrime
a ghoul
a ghoul
Posts: 86
Joined: Sun Sep 21, 2003 5:48 pm
Contact:

Post by Scrime » Wed Sep 24, 2003 2:22 pm

Have you considered (or tested) using $target(distance,nopredict)? Thats what I use in my hunter script and it works flawlessly.

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Wed Sep 24, 2003 2:40 pm

Scrime wrote:Have you considered (or tested) using $target(distance,nopredict)? Thats what I use in my hunter script and it works flawlessly.
That should work, since $target(distance,nopredict) doesn't use the target's speed when getting a distance, at least from what I saw in the code.

I made a suggestion to get rid of the EstimatedDistanceToSpawn function and just replace it with the already existing DistanceToSpawn function, which is used in $target(distance,nopredict).

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Wed Sep 24, 2003 3:36 pm

hmmm...I just added nopredict and it seems to be working correctly. I dont have time to make sure it is totally working since I gotta go to class but I will give it a shot when I get back

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Thu Sep 25, 2003 3:41 pm

FYI---- works perfecty with $target(distance,nopredict)