I figured it out and this is how i did it.
dbGlueObjectToLimb(40,11,2);
dbRotateObject(40,dbCameraAngleX(0),dbCameraAngleY(0)-0.8f,dbCameraAngleZ(0));
dbUnGlueObject(40);
//dbShowObject(40);
dbMoveObject(40,2);
b = 50;
while (b < 100)
{
int q = b;
if (dbObjectExist(b) == 0)
{
dbInstanceObject(b,40);
SC_SetupComplexObject (b,0,12);
dbGlueObjectToLimb(b,11,2);
dbPositionObject(b,dbObjectPositionX(40),dbObjectPositionY(40),dbObjectPositionZ(40));
dbRotateObject(b,dbCameraAngleX(0),dbCameraAngleY(0)-0.8f,dbCameraAngleZ(0));
dbUnGlueObject(b);
dbShowObject(b);
dbMoveObject(b,2);
int q = b -50;
bulletlife[q] = 0;
oldx[q] = dbObjectPositionX(b);
oldy[q] = dbObjectPositionY(b);
oldz[q] = dbObjectPositionZ(b);
b = 100;
}
else
{
b++;
}
}
Jack