See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: UCGO code help/issue  (Read 2049 times)

0 Members and 1 Guest are viewing this topic.

Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
22 July 2012, 03:04:39
On my eagle frieghter for Space 1999.  I have it coded so you can select to release on the left or right.  The freighter is attached to the Eagle.  When the eagle is landed you can release to the left or right.  But if the eagle is in flight then the cargo is released only on the left and through the mesh.

Code: [Select]
hUcgo.DeclareCargoSlot(0,_V( 1.62,-.577,-2),_V(0,0,0)); // slot 0
hUcgo.DeclareCargoSlot(1,_V( 1.62,-.577,-3.3),_V(0,0,0)); // slot 1
hUcgo.DeclareCargoSlot(2,_V( 1.62,-.577,-4.6),_V(0,0,0)); // slot 2

hUcgo.DeclareCargoSlot(3,_V( -1.62,-.577,-2),_V(0,0,0)); // slot 3
hUcgo.DeclareCargoSlot(4,_V( -1.62,-.577,-3.3),_V(0,0,0)); // slot 4
hUcgo.DeclareCargoSlot(5,_V( -1.62,-.577,-4.6),_V(0,0,0)); // slot 5




hUcgo.SetCargoMeshVisibility (0,MESHVIS_ALWAYS);
hUcgo.SetCargoMeshVisibility (1,MESHVIS_ALWAYS);
hUcgo.SetCargoMeshVisibility (2,MESHVIS_ALWAYS);
hUcgo.SetCargoMeshVisibility (3,MESHVIS_ALWAYS);
hUcgo.SetCargoMeshVisibility (4,MESHVIS_ALWAYS);
hUcgo.SetCargoMeshVisibility (5,MESHVIS_ALWAYS);


// UCGO 2.0 Parameters settings
hUcgo.SetReleaseSpeedInSpace(0.10f);   // release speed of cargo in space in m/s
hUcgo.SetMaxCargoMassAcceptable(50000.0);   // max cargo mass in kg that your vessel can carry
hUcgo.SetGrappleDistance(15);       // grapple distance radius in meter from center of ship
hUcgo.SetGlobalGroundReleasePos(_V(6,0,-2.5));// global release pos on ground



Here is where I select the left or right.  But even if none is selected it should release at 6 on the x axis.  But releases like
x=2.

Code: [Select]
if(key==OAPI_KEY_6&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
{
hUcgo.SetGlobalGroundReleasePos(_V(6,0,-2.5));// global release pos on ground
strcpy(SendCargHudMessage(),"Left Cargo release Selected");
}
if(key==OAPI_KEY_7&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
strcpy(SendCargHudMessage(),"Right Cargo release Selected");

{
hUcgo.SetGlobalGroundReleasePos(_V(-6,0,3.75));// global release pos on ground
}


« Last Edit: 22 July 2012, 04:44:28 by gattico »

Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #1 - 22 July 2012, 03:22:37
Quote
gattico a écrit:
On my eagle frieghter for Space 1999.  I have it coded so you can select to release on the left or right.  The freighter is attached to the Eagle.  When the eagle is landed you can release to the left or right.  But if the eagle is in flight then the cargo is released only on the left and through the mesh.

The release pos is only for ground "SetGlobalGroundReleasePos" in space the cargo is released at slot's position.

Quote
gattico a écrit:
But releases like x=2.

+-1.62 exactly ;)


Hope it help ?

Dan



Message modifié ( 22-07-2012 03:26 )

« Last Edit: 22 July 2012, 04:44:28 by DanSteph »

Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #2 - 22 July 2012, 04:44:28
ok.  Is there a way to make it release other than the slot.  We want it to release outside of the pod housing so a fuel tank the cargo can be picked up by the Eagle claw arm.

I guess a solution is to make the slot outside the pod at -6 and just not show the tank/cargo til released.



Post Edited ( 07-22-12 05:04 )

« Last Edit: 22 July 2012, 04:44:28 by gattico »