Support Coding a UCGO vessel

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
10,556
Reaction score
4,379
Points
203
Location
Dallas, TX
I have successfully added the code for UCGO into my vessel. It loads and unloads the cargo. But the cargo is NOT seen in the cockpit view.

I know in the cfg you can set it:
:CARGO
;-------------------------------------------------------------
CargoSlotPos = -0.70 0.374 2.50 ; Front left pos of first cargo slot X Y Z (see doc).
CargoRowColumnNbr = 2 4 ; Number of slot row & column (max 20 slots, see doc).
CargoSlotInterval = 0.05 ; Interval between each slot in meters.
CargoReleasePos = 0 -4.00 ; X Z pos at wich cargo will be placed when released (see doc).
CargoShowInCockpit= 0 ; Force cargo to appear also in cockpit view (only external by default).
CargoGrappleDist = 20 ; Grapple radius from center of cars. By defaut 15 meters.
 
From UCGOCargoSDK.h:

Code:
// this set the cargo mesh visibility as defined in Orbiter SDK. 
// by defaut loaded cargo mesh have "MESHVIS_EXTERNAL". You can use
// this function for example to disable cargo display when door closed (optimisation)
// [COLOR="Red"]or to allow them to be visible also in cockpit or vc mode.[/COLOR] (case of the forklift cars for example)
// See SetMeshVisibilityMode() function in orbiter's SDK.
void SetCargoMeshVisibility(int Num,int iMeshVisibility);
 
Thanks I found it. Now I need to get it to get to MESHVIS_ALWAYS

void SetCargoMeshVisibility(int Num,MESHVIS_ALWAYS);
but get errors:
 
Basic C++ knowledge would explain to you that changing the header reference will not help you here.

You need to call the function, not redefine it.
 
Thanks got it:
Code:
hUcgo.SetCargoMeshVisibility(0,MESHVIS_ALWAYS);

I have just 1 slot.
 
Back
Top