Question: Does anyone know where GetUnitLOS() lives?

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
makigono1
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 85
Joined: Sat Jun 06, 2015 2:30 am

Question: Does anyone know where GetUnitLOS() lives?

Post by makigono1 » Tue Sep 10, 2019 6:22 am

Hi Folks, got a question. Does anyone know where the function GetUnitLOS() is located?

enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1854
Joined: Sun May 15, 2011 8:47 am

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

Post by enric » Tue Sep 10, 2019 8:28 am

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);

makigono1
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 85
Joined: Sat Jun 06, 2015 2:30 am

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

Post by makigono1 » Tue Sep 10, 2019 8:45 am

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.

pipfromslitherine
Site Admin
Site Admin
Posts: 8977
Joined: Wed Mar 23, 2005 10:35 pm

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

Post by pipfromslitherine » Tue Sep 10, 2019 4:11 pm

It is a function which calls into the engine to do the LOS calculations. They would likely be performance prohibitive in script.

Cheers

Pip
follow me on Twitter here

makigono1
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 85
Joined: Sat Jun 06, 2015 2:30 am

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

Post by makigono1 » Tue Sep 10, 2019 5:09 pm

Indeed. Thank you kindly.

Post Reply

Return to “Battle Academy 2: Modders Corner”