Takeoff sequences

Dark Angel

Spaceman
How do I make takeoff sequences, please? There's the MS_ShowTakeoffSequence(tag) function mentioned in WCP.pas. The tag parameter accepts only numbers (if I type anything else, the debugger says it expected a <symbol>) and when I run the mission, it says it misses some update baseShip or whatever (when I type 0 or 1 or 2 for the tag). How do I tell it what ship to launch from? Or is there any other method apart from the hard way (that would involve A LOT of experimentation, though)? Thanks.
 
The 'tag' parameter refers to the name of an object, not a number. For example, if you want to take off from a capship that you've called "Lionheart", you'll type in MS_ShowTakeoffSequence(Lionheart); .

I don't remember for sure, but IIRC, you may need to declare the object before the MS_ShowTakeoffSequence function - otherwise, the compiler gets confused, because when it reads the tag parameter, it expects to have already encountered a declaration defining the object that the tag refers to.

(generally speaking, it's a good idea to declare all your objects and navpoints near the start of the mission code, before any functions; personally, I think the result looks a bit messy... but it helps to avoid problems like this)
 
Thanks a lot, but GenericTakeoff solved my problems already (you don't have to define the ship you launch from). But you're probably right, I'll give it a try.

Could you help me out with the SF_ExitLandObj(tag,capship,u1) function, please? The tag and capship parameters are quite self-explanatory, but what's the u1 parameter for?

And BTW, Lionheart is 9 chars...
 
I don't believe we ever figured out what 'u1' means in this case (note: any variable listed in WCPPas as 'u-something' is an unknown, although some of them are... uh, known unknowns :p). I suspected it might be the number of the landing bay for ships with multiple bays, but IIRC, tests seemed to indicate otherwise. In any case, it seems the number we use most often is "3". We don't know what it means, but it does seem to work :p.

As for the Lionheart, I can assure you the filename is also nine letters. I'm as surprised by it as you are - for some reason, we always forget that WCP isn't limited to eight letter filenames, but sometimes someone accidentally makes a file with a longer name, and it turns out to work :p.
 
Thanks, and BTW, when to use it? I mean, in what function should I call it and how does it work?

And about the 9-letter problem... Duh. It would make my creating of Standoff missions so much easier (for some reason, Treman doesn't work for me)! For example, I can't figure out the Wraith and I'd like to fly it... But this belongs in the Standoff forum...
 
Back
Top