Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Trivial Psychic on September 14, 2017, 08:25:50 am

Title: [SEXP Proposal]Waypoint Distance Check
Post by: Trivial Psychic on September 14, 2017, 08:25:50 am
This would either be for an entirely new SEXP or an upgrade to ai-waypoints/ai-waypoints-once.  I've seen times when you've got ships doing waypoints and the ship's limited maneuverability causes it to miss one of its waypoints by more than the hard-coded distance, so it continues to twirl around until it eventually gets there.  This can really irritate mission designers.  Could we make it possible for mission designers to designate how close the ship in question needs to get to its waypoint before the point is considered '"reached" and the ship can move onto the next point or stop (last point)?

Example:

ai-waypoints-once
-Path 2
-89
-Point 1 (optional)
-5 (optional distance in M)
-Point 2 (optional)
-10 (optional distance in M)

Would this be a desirable and feasible change?
Title: Re: [SEXP Proposal]Waypoint Distance Check
Post by: Cyborg17 on September 14, 2017, 11:13:23 am
Looking at the code, it looks like it would be a bit of a mess, especially to have a distance specified for each waypoint.  At least how I am able to read it, more than one ai function uses the same code to figure out if the ai ship is close enough to what it's heading to.  :blah: