Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: HLD_Prophecy on November 04, 2016, 12:45:02 pm

Title: Is-Cargo-Known question
Post by: HLD_Prophecy on November 04, 2016, 12:45:02 pm
Hey all!

I want to set up an event (to be specific, a show subtitle text event) to occur if the player has failed to scan a certain ship. How can I do this? Setting up an is-event-false condition that refers to an is-cargo-known event does not work.
Title: Re: Is-Cargo-Known question
Post by: Droid803 on November 04, 2016, 02:09:13 pm
Failed to scan?
Try has-departed-delay (or destroyed-departed-delay/is-destroyed-delay depending on how the ship can no longer be scanned) *and* not is-cargo-known ?
Title: Re: Is-Cargo-Known question
Post by: Mito [PL] on November 04, 2016, 02:21:49 pm
If I recall correctly, your event, PVD_Hope, will turn false just as the mission ends. Until that happens, the event will simply not be true (yet). Droid's right there. That should work.
Title: Re: Is-Cargo-Known question
Post by: 0rph3u5 on November 04, 2016, 06:13:15 pm
I want to set up an event (to be specific, a show subtitle text event) to occur if the player has failed to scan a certain ship. How can I do this? Setting up an is-event-false condition that refers to an is-cargo-known event does not work.

While Droid803's solution should work, I want to point out your mistake here:
the condition you need is not "is-event-false-delay" but "is-event-incomplete" ... "is-event-false-delay" only works if the contion of the event returns as "false", e.g. the ship specified in a "is-destroyed-delay" did depart.

"is-event-incomplete" however triggers if the event did not come either true or false yet by the time it is checked, e.g. the event checks if another event with "is-destroyed-delay" condition has returned true or false, since the ship in the condition has neither been destroyed (true) nor departed (false), the return for the "is-event-incomplete"-check is "true" which triggers the first event. Would the ship have been destroyed or departed, turning the second event either true or false, the first event's "is-event-incomplete"-check returns "false", not triggering the first event.
Title: Re: Is-Cargo-Known question
Post by: mjn.mixael on November 04, 2016, 06:26:30 pm
I honestly prefer going the...

not
--is-cargo-known-delay

because it makes the SEXP more readable. But either way will work.
Title: Re: Is-Cargo-Known question
Post by: HLD_Prophecy on November 04, 2016, 08:18:33 pm
Whoa, thanks a ton guys!

I didn't even know about the existence of is-event-incomplete. Or the existence of "not".

Yup, noob FREDer here. :rolleyes:
Title: Re: Is-Cargo-Known question
Post by: HLD_Prophecy on November 04, 2016, 08:27:05 pm
not is-cargo-known did not work. Nothing happened. Trying is-event-incomplete...
Title: Re: Is-Cargo-Known question
Post by: HLD_Prophecy on November 04, 2016, 08:33:04 pm
is-event-incomplete worked like a charm! Thanks a bunch!
Title: Re: Is-Cargo-Known question
Post by: 0rph3u5 on November 04, 2016, 08:33:22 pm
not is-cargo-known did not work.

conditions containig "not" should (have to?) always be combined with another condition, the use of and-in-sequence might be advised, otherwise the engine checks them as soon as possible (like the first frame of the mission) and sticks with the result
Title: Re: Is-Cargo-Known question
Post by: HLD_Prophecy on November 04, 2016, 08:59:00 pm
not is-cargo-known did not work.

conditions containig "not" should (have to?) always be combined with another condition, the use of and-in-sequence might be advised, otherwise the engine checks them as soon as possible (like the first frame of the mission) and sticks with the result

It was combined with another condition, an is-event-true-delay. That condition referred to a previous show-subtitle-text, with the delay being 10 seconds.

But if the engine checked, then the subtitle should have displayed (it did not) because the cargo was not yet known...  :confused:

I really don't think it matters as I got it to work the other way. Unless it's important that we hash this out.