LOSOptions
Controls the line-of-sight algorithm and flags used by CheckLOS and the pathfinding system.
The value is a combination of an algorithm type and optional flags, combined with bitwise OR.
Algorithm types:
| Constant | Value | Description |
|---|---|---|
losTypeSphere |
1 |
Sphere algorithm |
losTypeSphereAdv |
2 |
Advanced Sphere algorithm |
losTypeRunUO |
3 |
RunUO algorithm |
losTypePOL |
4 |
POL algorithm |
Optional flags:
| Constant | Value | Description |
|---|---|---|
losSphereCheckCorners |
$100 (256) |
Check corners (Sphere algorithms) |
losPolUseNoShoot |
$200 (512) |
Respect NoShoot tile flag (POL) |
losPolLOSThroughWindow |
$400 (1024) |
Allow LOS through windows (POL) |
See ConstantsAndEnums for the full reference.
This variable is Pascal-only (DWS + PascalScript). In Python, LOS options are passed directly as a parameter to CheckLOS.
Задаёт алгоритм и флаги проверки прямой видимости (Line of Sight), используемые CheckLOS и системой поиска пути.
Значение — комбинация типа алгоритма и опциональных флагов, объединённых побитовым OR.
См. ConstantsAndEnums для полного справочника.
Переменная доступна только в Pascal (DWS + PascalScript). В Python опции LOS передаются как параметр напрямую в CheckLOS.
var LOSOptions: Integer;
begin
LOSOptions := losTypePOL or losPolUseNoShoot;
if CheckLOS(GetX(Self), GetY(Self), GetZ(Self),
GetX(LastTarget), GetY(LastTarget), GetZ(LastTarget),
WorldNum, 0, LOSOptions) then
AddToSystemJournal('Target is visible')
else
AddToSystemJournal('Target is not visible');
end.