Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: MP-Ryan on June 10, 2007, 06:53:42 pm
-
I did a search and couldn't find this specific issue covered, so here goes.
Let's say I want to keep a relatively clean directives list so everything shows up as it should when all hell breaks loose, and thus I want to consolidate all my "destroy <wing>" directives into "Destroy all fighters" and a second one for "Destroy all bombers."
I THOUGHT it would be easy, that I could use the ship-type-destroyed SEXP and set it to 100% of fighters and 100% bombers. Ha. No. That calculates fighters and bombers present in the mission. If you clear them out, even though waves will respawn later, that directive goes to true. Simply marvelous.
Then I tried using is-destroyed-delay, and adding all the fighter wings and all the bomber wings. Problem is, because they enter the mission at various times, the directive doesn't show up until every wing has arrived. That didn't work either.
So them, is desperation, I tried dummy events. No dice there either - same effect as above.
So - is it possible to add a directive that tells you to destroy all of a certain kind of ship, even before all of those ships enter the mission, and doesn't complete until all respawns have ceased? Or is there another way to do this?
-
Seems you're trying to overcomplicate things.... Completed and failed directives will be automatically removed from the directives window in favor of incomplete directives after a certain threshold has been reached. Unless you've got a crazy-huge load of tasks to be doing in parallel, you'll never have more than four or five directives on-screen at once. That's why really long missions don't end up with a directives window that spans the entire height of the screen.
If that's not good enough for you, you could always try setting up a hostile stealth fighter, out in the middle of nowhere that departs once all of the fighters are destroyed. Then you use a dummy event to setup when the directive appears and key the directive to be true once the stealth fighter departs. The downside to this is that, unlike a typical "DESTROY EVERYTHING!" directive, this one will not keep count of the remaining fighters in the field. (Wash, rinse, and repeat for the bombers, by the way.)
-
Have you tried percent-ships-destroyed?
-
If that's not good enough for you, you could always try setting up a hostile stealth fighter, out in the middle of nowhere that departs once all of the fighters are destroyed. Then you use a dummy event to setup when the directive appears and key the directive to be true once the stealth fighter departs. The downside to this is that, unlike a typical "DESTROY EVERYTHING!" directive, this one will not keep count of the remaining fighters in the field. (Wash, rinse, and repeat for the bombers, by the way.)
You only need to do that kind of thing with Retail. In FSO 3.6.9 you'd simply make an event that checks if everything is destroyed and then use
when
-is-event-true-delay
--All Ships Dead
--0
--False
The last false tells the game to use the is-event-true only as a condition for making the directive become true and not to use it as a condition for making the directive appear in the first place.
-
percent-ships-destroyed worked.
Though karajorma, I initially tried something like that and couldn't figure out how to add the optional false clause (the add-data menu on the right click didn't work...)
-
You have FS2_Open 3.6.9?
-
You want the directive to re-show and re-validate for each new wing?
Hmmm.....................I'll think about that one.
-
Kind of like what was mentioned earlier, except have a few far-off Ulysses, one for each fighter and bomber. Make the directive set to destroy all of these Ulysses; the Ulysses are "tied" to an individual enemy ship, and will self-destruct when that ship is destroyed. The only drawback is that your Events log is going to be cluttered with destroyed dummy ships. Alternatively, you can use departure rather than destruction. Or, you *may* be able to use ship-dissapear, which functions exactly like ai-warp-out, except it doesn't appear in the events log.
You can figure it out, Ryan, we're no more creative than you are! :pimp:
-
(the add-data menu on the right click didn't work...)
Did you try add-operator?
-
(the add-data menu on the right click didn't work...)
Did you try add-operator?
No... I see that works, but I thought it would be a thrid data field under the event and the name, not an additional operator. *shrug* So it's supposed to use a 'false' operator?
EDIT: And yes, I'm using Fred2 Open 3.6.9
-
IIRC yes. If I'm wrong the directive will only actually appear when the directive is complete. Which is the default behaviour for the is-event-true-delay SEXP anyway. :)