Line of Sight

kram337

Member
Joined
Aug 10, 2006
Messages
155
Reaction score
0
Points
16
Line of sight doesn't really mean you can see a target, there could be trees, rocks, and other obstacles that block actual vision. The issue for me is that you can't cast through these objects. So I'll have LoS report TRUE but I can't cast.

The question; is there any way of determining a "spell" line of sight? Some bool value that would tell me I can cast from where I stand?
 
Line of sight doesn't really mean you can see a target, there could be trees, rocks, and other obstacles that block actual vision. The issue for me is that you can't cast through these objects. So I'll have LoS report TRUE but I can't cast.

The question; is there any way of determining a "spell" line of sight? Some bool value that would tell me I can cast from where I stand?

Short answer.. YES. LineOfSight is a sub object of the TLO (Top Level Object) of Target.

Simply add a condition of ${Target.LineOfSight}.

Example:
Code:
/if (${Target.ID} && ${Target.PctHPs}>0 && ${Target.Type.NotEqual[Corpse]} && ${Target.Type.Equal[NPC]} && ${Target.LineOfSight}) {
     /cast "some spell"
}

You can reference the TLO's and sub ordinances via:
http://www.macroquest2.com/includes/wassup/manual.php

and searching for objects at the Wiki page:
http://www.macroquest2.com/wiki/index.php/Main_Page
 
Last edited:
Hey thanks for the reply. Right now I'm using the TLO .LineOfSight:

/if (!${Target.LineOfSight}) {
/echo No Line of Sight, Try again
/goto :AvoidLoop
}

My issue is that it's inaccurate from a spell cast/vision point of view. If a tree is between you and the target it will still say "LineOfSight = TRUE" even though you can't see the mob, therefore can't cast.

The root of my question is: Is there any way to get a LineOfSight that takes all objects in your path into consideration?



Edit:
Perhaps there is a means of checking LineOfSight from the camera's perspective. I find no data to support that it exists but I thought I'd ask.
 
Last edited: