Is-event-true-delay

From FreeSpace Wiki
Jump to: navigation, search
is-event-true-delay
    Mission Event True (Boolean operator)
    Returns true N seconds after the specified event in the this mission is true (or succeeded). It returns false otherwise.

    Returns a boolean value. Takes 2 arguments...
    1: Name of the event in the mission.
    2: Number of seconds to delay before returning true.
FS2 Open 3.6.10: Takes an optional third argument, telling FSO that the event is current, and can be used for directives. When the third operator becomes true, the directive using the event will appear, and the directive will be completed when the event becomes true.

Comments

There are serious issues with this SEXP and directive events, and as such it should be avoided for that use whenever possible. Using it will in many cases prevent the directive from appearing on the HUD until it is either completed or has failed. This is because FreeSpace does not know when to start checking for the event, and as such only starts once the event is completed.


FS2 Open 3.6.10:

The third argument tells FreeSpace when to start checking for the event in a directive, so the directive will appear when this argument becomes true.

A directive checking for "Directive Event" will need to use "Dummy Delay Event" like this:

Directive.jpg

Axem made an example of this to delay when a normal directive ("destroy Aries wing") appears in the Directives box:

DirectiveEvent.jpg

Since Dummy Delay Event is tied to the third argument, the SEXP will only start checking for the event's status once Dummy Delay Event becomes true.

NOTE: The SEXP is also checking for the status of Dummy Delay Event itself; normally, ignoring Aries wing, this would cause the directive to become true as soon as it appears. The purpose of Axem's example was to make a directive to destroy Aries wing appear only after Dummy Delay Event is true.