Function - Line Of Sight

int lineOfSight ( char *actor1, char *actor2, double viewAngle, double fieldOfView, double viewRange )
Actor1/Actor2
Any Actors in game.
viewAngle
The direction Actor1 is facing.
fieldOfView
How "wide" the range of vision is. 90 degrees would be a typical value.
viewRange
How far the actor can see.
Returns
1 if clear line of sight between actor1 and actor2. 0 otherwise.
Note
Will ignore actors with actor variable "isSeeThrough" set to 1;
I have spent many days trying to make this with actors and timers but the code has become bloated and unmanageable. I feel that this would be an excellent addition to GE's function library. Please consider!
Actor1/Actor2
Any Actors in game.
viewAngle
The direction Actor1 is facing.
fieldOfView
How "wide" the range of vision is. 90 degrees would be a typical value.
viewRange
How far the actor can see.
Returns
1 if clear line of sight between actor1 and actor2. 0 otherwise.
Note
Will ignore actors with actor variable "isSeeThrough" set to 1;
I have spent many days trying to make this with actors and timers but the code has become bloated and unmanageable. I feel that this would be an excellent addition to GE's function library. Please consider!
