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: 93
Joined: Sat Jun 06, 2015 2:30 am

Question: Does anyone know where GetUnitLOS() lives?

Post by makigono1 »

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: 1855
Joined: Sun May 15, 2011 8:47 am

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

Post 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);
makigono1
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 93
Joined: Sat Jun 06, 2015 2:30 am

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

Post 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.
pipfromslitherine
Site Admin
Site Admin
Posts: 9816
Joined: Wed Mar 23, 2005 10:35 pm

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

Post 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
follow me on Twitter here
makigono1
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 93
Joined: Sat Jun 06, 2015 2:30 am

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

Post by makigono1 »

Indeed. Thank you kindly.
Post Reply

Return to “Battle Academy 2: Modders Corner”