Many have wondered how to have more than two special ship dudes in missions and make them each a seperate ship class. Well, I came up with a scheme recently that should work perfectlyin other words, it will avoid all loopholes that may confuse the user.
To start, you'll need to make a dude for each ship type. Then create as many missions as necessary to contain all your dudes. Make them all invisible. Give one of them an offer and/not brief text (if in the MC, give it a resource name, too), but nothing else. Then create a mission that is visible and has a quick text (and resource name, of course), but nothing else. It's just there so that should the user pull up the MI dialog, they'll still see the "one" mission. Now go back to your other missions and in each one's OnShipDone field, set it to abort itself and set an available ncb. Make a cron (yes, a cron) that only activates itself when all the "dude" mission's ncb's have been set. Make the cron run no matter when you get all the bits set, and have it run both OnStart and OnEnd at the same time. In the OnStart field (see Azratax2's post), make it activate one last mission. Give this mission a ReturnStel, a ReturnText, the payment, and, if necessary, have it set the bit(s) for the plot string it's involved in. Also have it abort the mission that has the quick text in its OnSuccess field. Now, just set the mission with the quick text to abort all the other missions, including the ones with the dudes and the one with the payment, in the OnAbort field, and you're set!
Note: Technically, you could save a mission and have the mission with the quick text have a dude and set an ncb in its OnShipDone field, but unless you have 1000 missions because of my method and need space for just one more (as if that's likely), it doesn't really make a difference.
I would be intersted in hearing feedback, or if someone has a different method. If someone doesn't, then I must be the all-time god of intertwining (anybody have a better word? :p) missions, ncb's, and crons.
(For those with no sense of humor, that was a joke.)
------------------
The programmer's code of entomology: there's always another bug.
(This message has been edited by orcaloverbri9 (edited 11-10-2003).)
(This message has been edited by orcaloverbri9 (edited 11-11-2003).)
(This message has been edited by orcaloverbri9 (edited 11-11-2003).)