Forcing Directive Failures

From FreeSpace Wiki
Revision as of 17:10, 24 May 2007 by Mustang19 (talk | contribs) (Added a second technique to get the same result)
Jump to: navigation, search

At times, you may want a mission directive to fail for plot reasons if the player makes certain choice. For example, say you have the player following a directive to head to a nav buoy, but on the way some contact shows up on the periphery of his scanners and he has the choice of checking that out instead, failing his original directive.

It might seem that you could just have the 'go to buoy' directive rely on both the player being near the buoy and not being close to the contact, but this will not fail the directive upon nearing the contact. It just stays incomplete, as the player could still later turn around and go to the buoy.

There is a way, though: What you need to keep in mind here is that with a few exceptions the directive text doesn't really care what the underlying conditions are. So what you you can do is check against something else instead of the player getting too close to the contact, something that will positively fail the directive when you want it to.

One way is to place a very, very, very far away ship that is otherwise totally unrelated to the mission. You want a small one for this, that can't be seen over great distances, and you want to disable warp effects and make it stealthy, invisible etc. to prevent it from showing up anywhere. Then set it's arrival cue to when you want the 'go to buoy' directive to appear, and the departure cue to when the player gets close enough the contact for the directive to fail. Then all you need to do is have the directive event check against the far away ship being disabled, and the directive will appear the moment the far away ship arrives, and fail the moment it leaves the mission.

The final touch then is to add an event that disables the far away ship if the player actually flies to the buoy and ignores the contact, letting the directive flash to completed if that happens.

Voila!

"Invisible ship" techniques like these are often recommended for beginner FREDers. However, there are many creative alternatives that involve slightly less hassle than making sure the player never notices strange "trigger ships". Remember also that the player can see these "invisible" ships arrive and depart in his Events log. Instead of using trigger ships, Volition used not >> is-event-true-delay conditions to force directive failure. In the example mentioned above, you could substitute this code.


Buoy Succesfully Reached Event:

-when
  - and
    - not
      -is-event-true-delay
       - 0
       - Player within 500m of unknown
    - <
       - distance
        - Alpha 1
        - Buoy
        - 500


As you can see, if the player comes within 500 units of the unknown, the event becomes permanently "failed", even if the player comes within 500 units of the buoy later.