Liberty Unleashed

Scripting => Script Help => Topic started by: IdkanYavuk X on May 18, 2013, 08:17:27 pm

Title: IsLineOfSightClear(?)
Post by: IdkanYavuk X on May 18, 2013, 08:17:27 pm
Direct to the point...
Arguments for the IsLineOfSightClear  (http://liberty-unleashed.co.uk/LUWiki/Squirrel/Client/Functions#Misc_Functions)function are needed, do anyone knows them?

Thank you
Title: Re: IsLineOfSightClear(?)
Post by: Juppi on May 19, 2013, 01:21:19 pm
Code: [Select]
bool IsLineOfSightClear( Vector pos1, Vector pos2 [, bool buildings, bool vehicles, bool peds, bool objects, bool transparent, bool ignoreStuff ] )
Test whether the line of sight between two points is clear. Returns false if one of the checks caused a collision, true if the line of sight is clear.


For the next update I've also added a function which does basically the same check as this one, but it also returns some extra info about the collision. This includes the collision position, object model (useful for finding the model of a GTA object) and possible LU pool info (pointer to player, vehicle, object etc).
Title: Re: IsLineOfSightClear(?)
Post by: Vortrex on May 19, 2013, 05:54:54 pm
Thanks Juppi, this is very helpful.

I have one problem however: this function always crashes my game when used.
Title: Re: IsLineOfSightClear(?)
Post by: Juppi on May 19, 2013, 09:23:11 pm
Ah yeah I can confirm that. Hopefully it'll be fixed in the next update
Title: Re: IsLineOfSightClear(?)
Post by: Vortrex on January 06, 2014, 01:38:45 pm
For the next update I've also added a function which does basically the same check as this one, but it also returns some extra info about the collision. This includes the collision position, object model (useful for finding the model of a GTA object) and possible LU pool info (pointer to player, vehicle, object etc).

I hate to be the idiot that causes necromancy to an old thread, but what is this function called? We have had new updates since this post and I cannot find documentation anywhere for it.
Title: Re: IsLineOfSightClear(?)
Post by: SugarD on January 19, 2014, 08:39:51 pm
For the next update I've also added a function which does basically the same check as this one, but it also returns some extra info about the collision. This includes the collision position, object model (useful for finding the model of a GTA object) and possible LU pool info (pointer to player, vehicle, object etc).

I hate to be the idiot that causes necromancy to an old thread, but what is this function called? We have had new updates since this post and I cannot find documentation anywhere for it.
I think he meant for the 0.1.1.0 update, rather than the updates to the 0.1.0.x branch.