Difference between revisions of "Is-event-true-delay"
(New page: 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...) |
(3rd optional argument) |
||
Line 6: | Line 6: | ||
1: Name of the event in the mission. | 1: Name of the event in the mission. | ||
2: Number of seconds to delay before returning true. | 2: Number of seconds to delay before returning true. | ||
+ | {{Table3610| | ||
+ | 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=== | ===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. | + | 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. |
+ | |||
+ | {{Table3610| | ||
+ | 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: | ||
+ | |||
+ | [[image:Directive.jpg]] | ||
+ | |||
+ | Axem made an example of this to delay when a normal directive ("destroy Aries wing") appears in the Directives box: | ||
+ | |||
+ | [[Image: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.}} | ||
[[Category:Retail SEXPs]] | [[Category:Retail SEXPs]] |
Latest revision as of 00:29, 21 October 2009
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.
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.
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:
Axem made an example of this to delay when a normal directive ("destroy Aries wing") appears in the Directives box:
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.