I have run into this on several vessels that I have been working on. If the vessel has more than 1 door. Like a car.
I know you can set multiple airlocks.
Then selected them and then press D and set the animation to the airlock condition. So if one selects door 1 and press D then door 1 opens and the airlock is open.
Then you save the state of the door and match the airlock. So if door1 is open then the airlock is open.
No problems with 1 door/airlock. The problem I have is with more than 1.
So if door 1 is open on exiting. When you restart Door 1 is open and so is the airlock. So if you switch to door 2 and open it. It closes the airlock. From all the code it looks like one 1 airlock can be open. Am I wrong?
I know you can set multiple airlocks.
Code:
void carvessel::SetUMMUAirlockPos(void)
{
int AirlockStatus=Crew.GetAirlockDoorState();
Crew.SetActiveDockForTransfer(iActiveDockNumber);
switch(iActiveDockNumber)
{
case 0: door0
Crew.DefineAirLockShape(TRUE,-10,10,-10,10,-10,10);// Start X, End X, Start Y,End Y,Start Z,End Z. Center is 0 // MinX, MaxX, MinY,MaxY,MinZ,MaxZ.//
Crew.SetMembersPosRotOnEVA(_V(-5.0, 1.17, -0.4),_V(0,270,0));
doorselected=0;
break;
case 1: // door2
Crew.DefineAirLockShape(TRUE,-10,10,-10,10,-10,10);// Start X, End X, Start Y,End Y,Start Z,End Z. Center is 0
Crew.SetMembersPosRotOnEVA(_V(5.5, 1.17, -0.4),_V(0,90,0));
doorselected=1;
break;
Code:
if(key==OAPI_KEY_D&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
{
//
Crew.SetAirlockDoorState(!Crew.GetAirlockDoorState());
// display state
if (doorselected==0)
{RevertDOOR2 ();
if(Crew.GetAirlockDoorState()==TRUE)
strcpy(SendHudMessage(),"Left Airlock is now open");
else
strcpy(SendHudMessage(),"Left Airlock is now closed");
}
if (doorselected==1)
{RevertDOOR1();
if(Crew.GetAirlockDoorState()==TRUE)
strcpy(SendHudMessage(),"Right Airlock is now open");
else
strcpy(SendHudMessage(),"Right Airlock is now closed");
}
}
Then you save the state of the door and match the airlock. So if door1 is open then the airlock is open.
Code:
if (DOOR1_proc<.1)Crew.SetAirlockDoorState(TRUE);
if (DOOR2_proc<.1)Crew.SetAirlockDoorState(TRUE);
No problems with 1 door/airlock. The problem I have is with more than 1.
So if door 1 is open on exiting. When you restart Door 1 is open and so is the airlock. So if you switch to door 2 and open it. It closes the airlock. From all the code it looks like one 1 airlock can be open. Am I wrong?