Page 1 of 1

Question: Does anyone know where GetUnitLOS() lives?

Posted: Tue Sep 10, 2019 6:22 am
by makigono1
Hi Folks, got a question. Does anyone know where the function GetUnitLOS() is located?

Re: Question: Does anyone know where GetUnitLOS() lives?

Posted: Tue Sep 10, 2019 8:28 am
by enric
located?
//does this unit have LOS to the tile? 0 means no
GetUnitLOS(id, x, y);
//returns 1 if the unit would have LOS between the provided tiles, zero otherwise
GetUnitLOSAtTile(id, startx, starty, endx, endy);
//does this unit have LOS to the target? 0 means no
GetUnitLOSToUnit(id, target);

Re: Question: Does anyone know where GetUnitLOS() lives?

Posted: Tue Sep 10, 2019 8:45 am
by makigono1
Yes, thanks, but where is that function located in the code? Is it stored in a BSF file, or is it buried in the code and inaccessible? Just curious.

Re: Question: Does anyone know where GetUnitLOS() lives?

Posted: Tue Sep 10, 2019 4:11 pm
by pipfromslitherine
It is a function which calls into the engine to do the LOS calculations. They would likely be performance prohibitive in script.

Cheers

Pip

Re: Question: Does anyone know where GetUnitLOS() lives?

Posted: Tue Sep 10, 2019 5:09 pm
by makigono1
Indeed. Thank you kindly.