Modding, Mission Design, and Coding > FRED Academy

distance question


when using retail FS2's FRED2, what do i need to do to use the "distance" SEXPs? i mean when i create a new event, the distance SEXPs seems to be always grayed out/unable to be used, even if i have ships in the map/mission already placed. so can anyone help me? thanks

The "distance" operator returns a number, so you can only use it in a place where a number is legal. For example:

op when
   op <
      op distance
         # Alpha 1
         # Jump node
      # 500
   op fix-warp
      #Alpha 1

As you can see, the "distance" operator in this case is used as one of the arguments for a "less-than" logical operator, which happens to require two numbers and thus will allow the use of "distance". It can't be used on its own, but must always be used as an argument in a logical or action operator that accepts a number.

okay thank you very much!


[0] Message Index

Go to full version