Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Darkhill on September 10, 2004, 12:29:09 pm

Title: Making a patrol route
Post by: Darkhill on September 10, 2004, 12:29:09 pm
I want to have a event setup to where the player needs patrol a certain route.  For the AI ships I just setup waypoints and gave them the order.  For the player ship I have nav bouys at the waypoints for visual clues.  Any ideas?
Title: Making a patrol route
Post by: Ghostavo on September 10, 2004, 12:47:22 pm
If you will want to use the distance expression.

If you want the player to follow the AI's, you will make an event that will activate another once the player is X distance from the AI ship it must follow. The activated event will become true once the player is X plus something distance from the AI ship you want to follow. Then you can link it to a goal making the goal false. You can use warning for the player in other events that were activated by the first by putting a distance expression but with a lower distance to the AI ship you want the player to follow and then send a message in that event.

If you want to have just the player following nav bouys, you just have to put a distance expression in the bouys you want him to follow that's all there is to it.
Title: Making a patrol route
Post by: Darkhill on September 10, 2004, 03:18:05 pm
I'm not sure how to get the distance sexp enabled.  I got it once by accident then removed it.  But when I had it I wasn't sure what I was doing with it.
Title: Making a patrol route
Post by: Blaise Russel on September 10, 2004, 03:24:15 pm
Use one of the symbols in the Arithmetic section. > or < should cover your needs.
Title: Making a patrol route
Post by: Darkhill on September 10, 2004, 04:20:07 pm
This is something I hacked out but the message shows at the start of the mission instead of when being close to the bouy.

    when
      |_ <
      |    |_distance
      |    |      |_nav bouy 2
      |    |      |_
      |    |__10
      |_show message

Its probably not right but its supposed be when within 10 meters of the bouy show the message.
Title: Making a patrol route
Post by: StratComm on September 10, 2004, 04:24:44 pm
Are the nav bouies friendly?  I.e. can you target it and see a green box?  The SEXP looks ok in principle, but you're discounting an obvious possibility.  It might be better to list of your fighter specifically (Alpha 1)  rather than ; I don't know what effect you're going for but I think that's what you'll want to do.
Title: Making a patrol route
Post by: Darkhill on September 10, 2004, 06:10:05 pm
I changed it to my craft and now it works.  Thanks for the help.
Title: Making a patrol route
Post by: magatsu1 on September 11, 2004, 07:01:10 am
on that point, always use "less than" or "greater than". "Equal" has to be_exactly_ equal and is therefore kinda useless.
Title: Making a patrol route
Post by: Solatar on September 11, 2004, 06:40:14 pm
In order to be closer than X (distance from object) you must cross X.

Less than or greater than are probably just a better habit to get into though.
Title: Making a patrol route
Post by: karajorma on September 11, 2004, 06:47:23 pm
Quote
Originally posted by Solatar
In order to be closer than X (distance from object) you must cross X.

Less than or greater than are probably just a better habit to get into though.


In the case of distance you're correct but when it comes to other things like damage certain numbers get skipped making = a bad choice.