Function - Line Of Sight

Ideas for Game Editor evolution.

Function - Line Of Sight

Postby jazz_e_bob » Sat Mar 05, 2005 7:11 am

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! :)
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest