1
0
EQ2Emu/docs/lua_functions/CheckLOSByCoordinates.md
2025-05-28 21:48:33 -04:00

21 lines
802 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### Function: CheckLOSByCoordinates(Origin, X, Y, Z)
**Description:** Checks line-of-sight from a spawn to a specific point in the world coordinates. Useful for verifying a locations visibility (for example, whether a ground target spell can reach a point).
**Parameters:**
`Origin`: Spawn The entity from which to check LOS.
`X`: Float X coordinate of the target point.
`Y`: Float Y coordinate of the target point.
`Z`: Float Z coordinate of the target point.
**Returns:** Boolean true if the line from Origin to (X,Y,Z) is clear; false if its obstructed.
**Example:**
```lua
-- Example usage (check if a spot is reachable by ranged attack)
if CheckLOSByCoordinates(Player, targetX, targetY, targetZ) then
LaunchProjectile(Player, targetX, targetY, targetZ)
end
```