Project Universal Astronaut and Cargo System (UACS)

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
314
Reaction score
284
Points
78
Location
Cairo
Not sure if I have this correct. Here I added a guy but not seen until I reload?
FLEX:FLEXUACS ASTR_STATION 0 ASTR_NAME John G. ASTR_ROLE Pilot ASTR_MASS 70.000000 ASTR_OXYGEN 0.999275 ASTR_FUEL 1.000000 ASTR_ALIVE 1 ASTR_CLASSNAME UACS\Astronauts\Xemuredbroke ASTR_STATION 1 ASTR_NAME Abdullah Radwan ASTR_ROLE Commander ASTR_MASS 70.000000 ASTR_OXYGEN 1.000000 ASTR_FUEL 1.000000 ASTR_ALIVE 1 ASTR_CLASSNAME UACS\Astronauts\Xemured
void FLEXUACS::clbkPostCreation () { mdlAPI.clbkPostCreation(); for (size_t idx{}; idx < vslAstrInfo.stations.size(); ++idx) { if (!vslAstrInfo.stations.at(idx).astrInfo) continue; const auto& astrInfo = *vslAstrInfo.stations.at(idx).astrInfo; SetEmptyMass(GetEmptyMass() + astrInfo.mass); SetStationMesh(idx, astrInfo.role, true); } } void FLEXUACS::SetStationMesh(size_t stationIdx, std::string_view role, bool show) { switch (stationIdx) { case 0://left // Show first station commander mesh if (role == "Commander") SetMeshVisibilityMode(6, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); // Show first station pilot mesh else if (role == "Pilot") SetMeshVisibilityMode(5, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); break; case 1://right // Show second station commander mesh if (role == "Commander") SetMeshVisibilityMode(4, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); // Show second station pilot mesh else if (role == "Pilot") SetMeshVisibilityMode(7, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); break; } }
Have you called SetStationMesh after adding the astronaut? After adding an astronaut, you should call SetEmptyMass and SetStationMesh to update the vessel mass and set the astronaut mesh. Same after egressing and deleting an astronaut.

EDIT: Looking back, it seems like I forgot to make the API call clbkGeneric with ASTR_INGRS when an astronaut is added and with ASTR_EGRS when the vessel transfers the astronaut to another vessel. I will do in the next update. This makes it necessary to call SetEmptyMass and SetStationMesh only when deleting an astronaut, as the deletion is done by the vessel by setting the astrInfo in the station to nullopt, instead of calling an API method.

Until the next update, you have to call the SetEmptyMass and SetStationMesh manually after the addition.
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
I Have this:
case UACS::ASTR_INGRS: { size_t stationIdx = *static_cast<size_t*>(context); auto& astrInfo = *(vslAstrInfo.stations.at(stationIdx).astrInfo); SetEmptyMass(GetEmptyMass() + astrInfo.mass); SetStationMesh(stationIdx, astrInfo.role, true); return 1; } case UACS::ASTR_EGRS: { size_t stationIdx = *static_cast<size_t*>(context); auto& astrInfo = *(vslAstrInfo.stations.at(stationIdx).astrInfo); SetEmptyMass(GetEmptyMass() - astrInfo.mass); SetStationMesh(stationIdx, astrInfo.role, false); return 1; }
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
Also can the astronauts grab other things than cargo? Like here is a US Flag vessel. It has attachments so the guy can picked up. But when I press ALT G it says no free cargo available. I just realized the Right ALT controls the cargo and the left Alt control the Astronaut.
 

Attachments

  • evaflag.jpg
    evaflag.jpg
    71.8 KB · Views: 10
  • addevaguy.jpg
    addevaguy.jpg
    74.1 KB · Views: 10

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
314
Reaction score
284
Points
78
Location
Cairo
I Have this:
case UACS::ASTR_INGRS: { size_t stationIdx = *static_cast<size_t*>(context); auto& astrInfo = *(vslAstrInfo.stations.at(stationIdx).astrInfo); SetEmptyMass(GetEmptyMass() + astrInfo.mass); SetStationMesh(stationIdx, astrInfo.role, true); return 1; } case UACS::ASTR_EGRS: { size_t stationIdx = *static_cast<size_t*>(context); auto& astrInfo = *(vslAstrInfo.stations.at(stationIdx).astrInfo); SetEmptyMass(GetEmptyMass() - astrInfo.mass); SetStationMesh(stationIdx, astrInfo.role, false); return 1; }
There is no issue with your code. The issue is that the API should call clbkGeneric after astronaut addition, but I forgot to do so. Until the next update, just call SetEmptyMass and SetStationMesh in the same way as the ASTR_INGRS block after adding the astronaut.
Also can the astronauts grab other things than cargo? Like here is a US Flag vessel. It has attachments so the guy can picked up. But when I press ALT G it says no free cargo available. I just realized the Right ALT controls the cargo and the left Alt control the Astronaut.
No. Only UACS modules can be grappled currently.

As for left/right Alt, this is for the Carrier only. Astronauts don't differentiate between left and right Alt.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
OK. So on the grabbing. Is it just searching for attachment ID's?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
On the airlock. Can the airlock position and where the eva occurs be different?
Can the size of the airlock be changed?
Is there a key to open the airlock?

The reason about the different airlock position and size. We had vessels that even though the ship has above the elevation you could select a airlock on the ground. So the guy would be released on the ground?

In the UMMU code it was like this:
Crew.DefineAirLockShape(AirlockStatus,-20,20,-20,13,-200,0); Crew.SetMembersPosRotOnEVA(_V(-12,-11.234,-89),_V(0,0,0));
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
Also. What the TD points for the cargo packed?
I have this USflag that I don't want it to be packed. So just a mesh. But it seems that changing the TD points didn't change any thing?
astro:UACS\Astronauts\Xemured STATUS Landed Moon POS 1.2854840 7.3636843 HEADING 87.56 ALT 0.910 AROT 2.421 1.597 82.697 RCSMODE 0 AFCMODE 7 PRPLEVEL 0:1.000000 1:0.980519 NAVFREQ 0 0 NAME Abdullah Radwan ROLE Commander MASS 70.000000 ALIVE 1 SUIT_ON 1 HUD_MODE 4 HEADLIGHT 0 END FlagNasa:UACS\Cargoes\NASAUS STATUS Landed Moon POS 1.2855640 7.3636880 HEADING 87.56 ALT 0.644 AROT 2.398 1.774 82.697 ATTACHED 0:0,astro AFCMODE 7 END
 

Attachments

  • nasaflaguacs.jpg
    nasaflaguacs.jpg
    84.1 KB · Views: 3
  • NASAUS.txt
    1.4 KB · Views: 1

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
314
Reaction score
284
Points
78
Location
Cairo
On the airlock. Can the airlock position and where the eva occurs be different?
Can the size of the airlock be changed?
Is there a key to open the airlock?

The reason about the different airlock position and size. We had vessels that even though the ship has above the elevation you could select a airlock on the ground. So the guy would be released on the ground?

In the UMMU code it was like this:
Crew.DefineAirLockShape(AirlockStatus,-20,20,-20,13,-200,0); Crew.SetMembersPosRotOnEVA(_V(-12,-11.234,-89),_V(0,0,0));
There are 2 airlock positions: space position (pos) and ground position (gndInfo.pos). Only one position is used depending on the vessel status. So no, the egress position is always the same as the airlock position.

I am not sure what you mean with the airlock size. The airlock has an ingress range and that can be changed using the range parameter. As for opening the airlock, the vessel can open it immediately by change the open parameter. Astronauts can't however, so the vessel must have an action area for that.
Also. What the TD points for the cargo packed?
I have this USflag that I don't want it to be packed. So just a mesh. But it seems that changing the TD points didn't change any thing?
astro:UACS\Astronauts\Xemured STATUS Landed Moon POS 1.2854840 7.3636843 HEADING 87.56 ALT 0.910 AROT 2.421 1.597 82.697 RCSMODE 0 AFCMODE 7 PRPLEVEL 0:1.000000 1:0.980519 NAVFREQ 0 0 NAME Abdullah Radwan ROLE Commander MASS 70.000000 ALIVE 1 SUIT_ON 1 HUD_MODE 4 HEADLIGHT 0 END FlagNasa:UACS\Cargoes\NASAUS STATUS Landed Moon POS 1.2855640 7.3636880 HEADING 87.56 ALT 0.644 AROT 2.398 1.774 82.697 ATTACHED 0:0,astro AFCMODE 7 END
The packed cargo touchdown point is:
C++:
frontPos = { 0, -0.65, 0.65 };
rightPos = { 0.65, -0.65, -0.65 };
leftPos = { -0.65, -0.65, -0.65 };
As for your cargo, you can't have a cargo without a packed state and information, so every cargo must have packed and unpacked mesh. What you can do instead is making the cargo unpackable only, so that once it's unpacked it can't be packed again.

Since you used the unpacked mesh as the packed mesh, UACS deals with the cargo as a packed one, and it uses the packed cargo touchdown points which are hardcoded and can't be changed.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
Ok.
I have this. My pressing D it if airlock 0 is selected the animation occurs.
if (key == OAPI_KEY_D && !KEYMOD_SHIFT(kstate) && !KEYMOD_CONTROL(kstate)) { if (astrHUD.airlockIdx == 0) RevertDOOR();//right if (astrHUD.airlockIdx == 1) RevertDOOR1();//left return 1; }
and vslAstrInfo.airlocks.at(0).open = DOOR_proc >= 1;//FRONT vslAstrInfo.airlocks.at(1).open = DOOR1_proc >= 1;//AFT
But what I want is airlock
if (astrHUD.airlockIdx == 2) open airlock
{vslAstrInfo.airlocks.at(2).open=1:

So I have this:
airInfo2.name = "T_Pad_Left";
airInfo2.pos = { -39,-3.85,-1 };
airInfo2.dir = { 0,0,-1 };
airInfo2.rot = { -1,0,0 };
airInfo2.range = { 5 };

BUT for some reason It says the airlock is open But I can't exit the craft


So on the cargo. We can just create the cargo unpacked?
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
Not sure how to fix this.
In the MBA. We had action areas. In this case the guy opens the doors. That works.
BUT then you move to the center of the car and another action area
but then a choice box open that is where I have an issue?
case 1: { OBJHANDLE hV = oapiGetFocusObject(); VESSEL* v = oapiGetFocusInterface(); UMMU1 = v->GetAttachmentHandle(true, 1); if (GetAttachmentStatus(UMMU1)) { if (!_strnicmp(dest, "1", 1)) { RevertTCAR1(); strcpy(dest, ""); } } else { if (!_strnicmp(dest, "", 1)) { oapiOpenInputBox("Your destination (1,2)? 1-LP3, 2-Nowhere", ChoiceBox, 0, 2, (void*)this); } else { if (!_strnicmp(dest, "1", 1))// || !_strnicmp(dest,"2",1)) { AttachUmmu1();//don't reset dest now!!! } if (!_strnicmp(dest, "2", 1)) { //do nothing then we have to reset dest. strcpy(dest, ""); } } } } break;
but I get this:
Severity Code Description Project Path File Line Suppression State
Error C3867 'LPAD4A::ChoiceBox': non-standard syntax; use '&' to create a pointer to member FLEXUACS D:\Orbiter2016\Orbitersdk\samples\LPAD4a D:\Orbiter2016\Orbitersdk\samples\LPAD4a\LPAD4AUACS.cpp 1478
h:
char dest[50];
char str[50];
bool ChoiceBox(void* id, char* str, void* data)
{
sprintf(dest, "%s", str);
return 1;
}
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
On the Action areas? Will it detect if more than one vessel has them and in the area? For example. The Moonbase Alpha is consists of several vessels. But it seems when I move the guy around. It doesn't detect the other vessels action areas
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
In this LTV. When I added the 2nd crew guy he is not seen until I restart.
case UACS::ASTR_INGRS: { size_t stationIdx = *static_cast<size_t*>(context); auto& astrInfo = *(vslAstrInfo.stations.at(stationIdx).astrInfo); SetEmptyMass(GetEmptyMass() + astrInfo.mass); SetStationMesh(stationIdx, astrInfo.role, true); return 1; } case UACS::ASTR_EGRS: { size_t stationIdx = *static_cast<size_t*>(context); auto& astrInfo = *(vslAstrInfo.stations.at(stationIdx).astrInfo); SetEmptyMass(GetEmptyMass() - astrInfo.mass); SetStationMesh(stationIdx, astrInfo.role, false); return 1; }

Also is it possible to add cargo from the Menu like Astronauts?
 

Attachments

  • LTVCREW.jpg
    LTVCREW.jpg
    78.6 KB · Views: 6
Last edited:

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
314
Reaction score
284
Points
78
Location
Cairo
Ok.
I have this. My pressing D it if airlock 0 is selected the animation occurs.
if (key == OAPI_KEY_D && !KEYMOD_SHIFT(kstate) && !KEYMOD_CONTROL(kstate)) { if (astrHUD.airlockIdx == 0) RevertDOOR();//right if (astrHUD.airlockIdx == 1) RevertDOOR1();//left return 1; }
and vslAstrInfo.airlocks.at(0).open = DOOR_proc >= 1;//FRONT vslAstrInfo.airlocks.at(1).open = DOOR1_proc >= 1;//AFT
But what I want is airlock
if (astrHUD.airlockIdx == 2) open airlock
{vslAstrInfo.airlocks.at(2).open=1:

So I have this:
airInfo2.name = "T_Pad_Left";
airInfo2.pos = { -39,-3.85,-1 };
airInfo2.dir = { 0,0,-1 };
airInfo2.rot = { -1,0,0 };
airInfo2.range = { 5 };

BUT for some reason It says the airlock is open But I can't exit the craft


So on the cargo. We can just create the cargo unpacked?
What's the error message you have when you try to exit the vessel?

You can't create unpacked cargoes. What you can do is create a cargo with unpackable type and unpackable only flag, add the cargo to the scenario, and unpack it. It will stay unpacked and can't be packed again.
Not sure how to fix this.
In the MBA. We had action areas. In this case the guy opens the doors. That works.
BUT then you move to the center of the car and another action area
but then a choice box open that is where I have an issue?
case 1: { OBJHANDLE hV = oapiGetFocusObject(); VESSEL* v = oapiGetFocusInterface(); UMMU1 = v->GetAttachmentHandle(true, 1); if (GetAttachmentStatus(UMMU1)) { if (!_strnicmp(dest, "1", 1)) { RevertTCAR1(); strcpy(dest, ""); } } else { if (!_strnicmp(dest, "", 1)) { oapiOpenInputBox("Your destination (1,2)? 1-LP3, 2-Nowhere", ChoiceBox, 0, 2, (void*)this); } else { if (!_strnicmp(dest, "1", 1))// || !_strnicmp(dest,"2",1)) { AttachUmmu1();//don't reset dest now!!! } if (!_strnicmp(dest, "2", 1)) { //do nothing then we have to reset dest. strcpy(dest, ""); } } } } break;
but I get this:
Severity Code Description Project Path File Line Suppression State
Error C3867 'LPAD4A::ChoiceBox': non-standard syntax; use '&' to create a pointer to member FLEXUACS D:\Orbiter2016\Orbitersdk\samples\LPAD4a D:\Orbiter2016\Orbitersdk\samples\LPAD4a\LPAD4AUACS.cpp 1478
h:
char dest[50];
char str[50];
bool ChoiceBox(void* id, char* str, void* data)
{
sprintf(dest, "%s", str);
return 1;
}
Yes, the issue is how you pass this pointer to the input box function. It's not related to UACS.
On the Action areas? Will it detect if more than one vessel has them and in the area? For example. The Moonbase Alpha is consists of several vessels. But it seems when I move the guy around. It doesn't detect the other vessels action areas
The nearest HUD will only show the nearest action area. You can select a vessel and action area (and trigger those in range) in the vessel HUD.
In this LTV. When I added the 2nd crew guy he is not seen until I restart.
case UACS::ASTR_INGRS: { size_t stationIdx = *static_cast<size_t*>(context); auto& astrInfo = *(vslAstrInfo.stations.at(stationIdx).astrInfo); SetEmptyMass(GetEmptyMass() + astrInfo.mass); SetStationMesh(stationIdx, astrInfo.role, true); return 1; } case UACS::ASTR_EGRS: { size_t stationIdx = *static_cast<size_t*>(context); auto& astrInfo = *(vslAstrInfo.stations.at(stationIdx).astrInfo); SetEmptyMass(GetEmptyMass() - astrInfo.mass); SetStationMesh(stationIdx, astrInfo.role, false); return 1; }

Also is it possible to add cargo from the Menu like Astronauts?
As I said earlier, until the next update is released, you have to call SetEmptyMass and SetStationMesh after adding the astronaut to update the vessel mass and show the mesh. You won't need to do this when the next update is released.

Yes, you can add cargoes from scenario editor normally.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
Thanks. On the Eagle selecting airlock Tpad, Even though it says it is open I can't exit a guy no error message.

But I thought I had this in the correct area?
call SetEmptyMass and SetStationMesh

But on the action areas we have several vessels in the same area. The focused vessel is the UACS guy. Do I need to switch vessel to get to the vessel action area.

Not sure how to fix these though?
Yes, the issue is how you pass this pointer to the input box function. It's not related to UACS.
It worked in the old code.
 

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
314
Reaction score
284
Points
78
Location
Cairo
Thanks. On the Eagle selecting airlock Tpad, Even though it says it is open I can't exit a guy no error message.

But I thought I had this in the correct area?
call SetEmptyMass and SetStationMesh

But on the action areas we have several vessels in the same area. The focused vessel is the UACS guy. Do I need to switch vessel to get to the vessel action area.

Not sure how to fix these though?
Yes, the issue is how you pass this pointer to the input box function. It's not related to UACS.
It worked in the old code.
What do you mean by "I can't exit a guy"? What's the result of the call to EgressAstronaut method?

Yes, you have the methods in the correct area, but there is a bug in UACS currently, so you need to call them after adding the astronaut.

I am not sure what you are trying to do with the action areas. If you are inside an astronaut and want to trigger a specific action area, go to the vessel information HUD mode, select the vessel, then select the action area and trigger it as required.

As for the pointer issue, I am not really sure but I believe you have to make the method and variables static, so in the header file:

C++:
inline static char str[50];
static bool ChoiceBox(void* id, char* str, void* data)
{
sprintf(dest, "%s", str);
return 1;
}
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
Thanks.

As far as Action areas. We have 3 or 4 vessels in the same general area. Thus we have several action areas. The guy walks to the action area of vessel "A". BUt on the HUD it might say nearest action are is somewhere else. But on the Vessel it might say Vessel B.

The focused vessel is the UACS.

I can make some images and explain this better
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,563
Reaction score
2,526
Points
203
Location
Dallas, TX
On the Eagle It shows Tpad open and I got a guy. But pressing ALt I does nothing.
airInfo3.name = "T_Pad_Right"; airInfo3.pos = { 39,-3.85,-1 }; airInfo3.dir = { 0,0,-1 }; airInfo3.rot = { -1,0,0 }; vslAstrInfo.airlocks.push_back(airInfo); vslAstrInfo.airlocks.push_back(airInfo1); vslAstrInfo.airlocks.push_back(airInfo2); vslAstrInfo.airlocks.push_back(airInfo3); vslAstrInfo.airlocks.push_back(airInfo4); vslAstrInfo.airlocks.push_back(airInfo5);

this worked at least compiled.
inline static char dest[50]; inline static char str[50]; static bool ChoiceBox(void* id, char* str, void* data) { sprintf(dest, "%s", str); return 1; }

Still CTD here:
OBJHANDLE hV = oapiGetFocusObject(); VESSEL* v = oapiGetFocusInterface(); UMMU1 = v->GetAttachmentHandle(true, 1); if (GetAttachmentStatus(UMMU1))
It should get the attachment status of the UACS guy and if not attached do something.

I added a attachment to the UACS astronaut.


On the action area. Here we got 3 UACS vessels. At the action area it shows LPAD4 breatheable area but the alpharing action area. But delete the Alpharing gets you LPAD4 action area.
 

Attachments

  • eagletpadeva.jpg
    eagletpadeva.jpg
    55.7 KB · Views: 5
  • mbalpaduacs.jpg
    mbalpaduacs.jpg
    64.1 KB · Views: 6
  • lpaddoor1.jpg
    lpaddoor1.jpg
    44.4 KB · Views: 2
  • lpad4a.jpg
    lpad4a.jpg
    43.5 KB · Views: 5

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
314
Reaction score
284
Points
78
Location
Cairo
Thanks.

As far as Action areas. We have 3 or 4 vessels in the same general area. Thus we have several action areas. The guy walks to the action area of vessel "A". BUt on the HUD it might say nearest action are is somewhere else. But on the Vessel it might say Vessel B.

The focused vessel is the UACS.

I can make some images and explain this better
That's because the nearest action area (and airlock) logic gets the nearest vessel first, then it returns the nearest action area in it. This will not always yield the actual nearest action area, because it's possible that an action area in a far vessel is nearer than an action area in the nearest vessel.
On the Eagle It shows Tpad open and I got a guy. But pressing ALt I does nothing.
airInfo3.name = "T_Pad_Right"; airInfo3.pos = { 39,-3.85,-1 }; airInfo3.dir = { 0,0,-1 }; airInfo3.rot = { -1,0,0 }; vslAstrInfo.airlocks.push_back(airInfo); vslAstrInfo.airlocks.push_back(airInfo1); vslAstrInfo.airlocks.push_back(airInfo2); vslAstrInfo.airlocks.push_back(airInfo3); vslAstrInfo.airlocks.push_back(airInfo4); vslAstrInfo.airlocks.push_back(airInfo5);

this worked at least compiled.
inline static char dest[50]; inline static char str[50]; static bool ChoiceBox(void* id, char* str, void* data) { sprintf(dest, "%s", str); return 1; }

Still CTD here:
OBJHANDLE hV = oapiGetFocusObject(); [CODE=cpp]VESSEL* v = oapiGetFocusInterface(); vAttachHandle = v->GetAttachmentHandle(true, 1); if (vAttachHandle && v->GetAttachmentStatus(vAttachHandle))[/CODE]
It should get the attachment status of the UACS guy and if not attached do something.

I added a attachment to the UACS astronaut.


On the action area. Here we got 3 UACS vessels. At the action area it shows LPAD4 breatheable area but the alpharing action area. But delete the Alpharing gets you LPAD4 action area.
What are you trying to do exactly? If I understood correctly, you have a vessel with several airlock, then you have an astronaut in range, and when you're inside the astronaut and press Ctrl + I nothing happens. Is this true? If so, you must be in either nearest or vessel HUD mode to ingress. If you pressed Ctrl + I and the ingress is not successful, an error message must appear. What's the error message?

As for the CTD, you must verify that the output of the GetAttachmentHandle method is not null, otherwise you will have an CTD when you call GetAttachmentStatus. Also, you must call GetAttachmentStatus for the vessel that has the attachment handle, NOT your vessel. A proper code will be like this:
C++:
VESSEL* v = oapiGetFocusInterface();

vAttachHandle = v->GetAttachmentHandle(true, 1);

if (vAttachHandle && GetAttachmentStatus(vAttachHandle))
I am not sure about your code design, but I think you should also verify if the focus vessel is actually the vessel you want.
 
Top