Here's the code I used for the payload jettison definition:
// Jettison Dropship
if (launch ==1 )
{
launch = 2;
DelMesh (2);
VESSELSTATUS2 vs;
memset (&vs, 0, sizeof (vs));
vs.version = 2;
GetStatusEx (&vs);
//vs.flag = VS_FUELREGET | VS_THRUSTREGET;
VECTOR3 ofs = _V(0,-2.5,2.222);
VECTOR3 rofs, rvel = {vs.rvel.x, vs.rvel.y, vs.rvel.z};
VECTOR3 vel = {0,-10,0};
Local2Rel (ofs, vs.rpos);
GlobalRot (vel, rofs);
vs.rvel.x = rvel.x+rofs.x;
vs.rvel.y = rvel.y+rofs.y;
vs.rvel.z = rvel.z+rofs.z;
vs.vrot.x = -0.02;
vs.status = 0;
oapiCreateVesselEx ("K-X-1A-v3","K33\\K-X-1A-v3",&vs);
SetEmptyMass (12000.0);
}
if (launch == 2)
{
timering = timering + 0.33 ;
if (timering >= 27)
{
launch = 3;
oapiSetFocusObject(oapiGetVesselByName("K-X-1A-v3"));
}
}
}
BTW, it's not my code. I just copied it off of a source file for another addon.