Buck Rogers
Major Spacecadet
- Joined
- Feb 26, 2013
- Messages
- 414
- Reaction score
- 332
- Points
- 63
In the API there's a call for: SetAttenuation ( , , ), I think this controls power.
!vslAstrInfo.airlocks.at(0).open;
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); //show the mesh
}
}
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;
}
}
if (key == OAPI_KEY_D && !KEYMOD_SHIFT(kstate) && KEYMOD_CONTROL(kstate) && !KEYMOD_ALT(kstate)) {
if (astrHUD.airlockIdx == 0) RevertADOOR1();
if (astrHUD.airlockIdx == 1) RevertADOOR2();
if (astrHUD.airlockIdx ==2) RevertDOOR1();
if (astrHUD.airlockIdx == 3) RevertDOOR2();
vslAstrInfo.airlocks.at(0).open = ADOOR1_proc >= 1;//LEFT
vslAstrInfo.airlocks.at(1).open = ADOOR2_proc >= 1;//RIGHT
vslAstrInfo.airlocks.at(2).open = DOOR1_proc >= 1;//LEFT
vslAstrInfo.airlocks.at(3).open = DOOR2_proc >= 1;//RIGHT
void MMSEV::clbkPostCreation(void)
{
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);
}
vslAstrInfo.airlocks.at(0).open = ADOOR1_proc >= 1;//LEFT
vslAstrInfo.airlocks.at(1).open = ADOOR2_proc >= 1;//RIGHT
vslAstrInfo.airlocks.at(2).open = DOOR1_proc >= 1;//LEFT
vslAstrInfo.airlocks.at(3).open = DOOR2_proc >= 1;//RIGHT
}
void MMSEV::SetStationMesh(size_t stationIdx, std::string_view role, bool show)
{
switch (stationIdx)
{
case 0://left
// Show first station commander mesh
if (role == "Commander") SetMeshVisibilityMode(4, 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(5, show ? MESHVIS_ALWAYS : MESHVIS_NEVER);
break;
}
}
eva1_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitright1");
SetMeshVisibilityMode(AddMesh(eva1_mesh, &mesh1ofs), MESHVIS_NEVER );
eva2_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitleft1");
SetMeshVisibilityMode(AddMesh(eva2_mesh, &mesh1ofs), MESHVIS_NEVER);
void MMSEV::SetStationMesh(size_t stationIdx, std::string_view role, bool show)
{
sprintf(oapiDebugString(), "stationidx %d", stationIdx);
switch (stationIdx)
{
case -1://right
// Show first station commander mesh
SetMeshVisibilityMode(4, MESHVIS_NEVER);
SetMeshVisibilityMode(5, MESHVIS_NEVER);
// Show first station pilot mesh
break;
case 0://left
// Show first station commander mesh
SetMeshVisibilityMode(4, MESHVIS_EXTERNAL);
SetMeshVisibilityMode(5, MESHVIS_NEVER);
// Show first station pilot mesh
break;
case 1://right
// Show first station commander mesh
SetMeshVisibilityMode(4, MESHVIS_EXTERNAL);
SetMeshVisibilityMode(5, MESHVIS_EXTERNAL);
// Show first station pilot mesh
break;
break;
}
}
The lamp cargo has 5 lamps. The issue is that both packed and unpacked cargoes use the same name, which causes naming issues if another packed lamp cargo exists when unpacking. I should fix this in the next update.How many lamps are you supposed to get when unpacked? I'm getting cargolamp1-4, and lamp1, total 5. Maybe just a naming issue?
Yes. Use the astronaut API to make a custom astronaut. Implement the necessary methods as specified in the documents then implement any custom functionality you would like.Also. on the astronauts. Can they also be vessels? rathe than meshes
The reason I ask is so that we can use specialized eva guy like my shuttle guy with arm/leg animations,.....
Yes. UCSO is obsolete now.Sorry for my ignorance, does the UACS - Universal Astronaut and Cargo System include UCSO - Universal Cargo System for Orbiter? That is, does the UACS have all (or almost all features) as the UCSO and replace it?
I will see what I can do regarding sounds.Thanks.
It needs to work with Sound
not sure how to make a custom astronaut. if the astronaut. cfg. It looks like you can only change meshes?
And the fix of the showing the meshes of the crew
eva1_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitright1");
SetMeshVisibilityMode(AddMesh(eva1_mesh, &mesh1ofs), MESHVIS_NEVER );
eva2_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitleft1");
SetMeshVisibilityMode(AddMesh(eva2_mesh, &mesh1ofs), MESHVIS_NEVER);
void MMSEV::clbkPostCreation(void)
{
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);
}
vslAstrInfo.airlocks.at(0).open = ADOOR1_proc >= 1;//LEFT
vslAstrInfo.airlocks.at(1).open = ADOOR2_proc >= 1;//RIGHT
vslAstrInfo.airlocks.at(2).open = DOOR1_proc >= 1;//LEFT
vslAstrInfo.airlocks.at(3).open = DOOR2_proc >= 1;//RIGHT
}
void MMSEV::SetStationMesh(size_t stationIdx, std::string_view role, bool show)
{
//sprintf(oapiDebugString(), "stationidx %d", stationIdx);
switch (stationIdx)
{
case -1://right
// Show first station commander mesh
SetMeshVisibilityMode(4, MESHVIS_NEVER);
SetMeshVisibilityMode(5, MESHVIS_NEVER);
// Show first station pilot mesh
break;
case 0://left
// Show first station commander mesh
SetMeshVisibilityMode(4, MESHVIS_EXTERNAL);
SetMeshVisibilityMode(5, MESHVIS_NEVER);
// Show first station pilot mesh
break;
case 1://right
// Show first station commander mesh
SetMeshVisibilityMode(4, MESHVIS_EXTERNAL);
SetMeshVisibilityMode(5, MESHVIS_EXTERNAL);
// Show first station pilot mesh
break;
break;
}
}
MMSEVUACS:MMSEVUACS
ASTR_STATION 0
ASTR_NAME Abdullah Radwan
ASTR_ROLE commander
ASTR_MASS 80.00
ASTR_OXYGEN 1.00
ASTR_FUEL 1.00
ASTR_ALIVE 1
ASTR_CLASSNAME UACS\Astronauts\NASASuitZ2
ASTR_STATION 1
ASTR_NAME Abdullah Radwan
ASTR_ROLE commander
ASTR_MASS 80.00
ASTR_OXYGEN 1.00
ASTR_FUEL 1.00
ASTR_ALIVE 1
ASTR_CLASSNAME UACS\Astronauts\NASASuitZ2
LIGHTF
SOLAR 0 0.0000
FDOORL 0 0.0000
FDOORR 0 0.0000
ADOORL 1 1.0000
ADOORR 1 1.0000
SOLP 4 0 0 0.0000
CAM 0 0.0000
STATUS Landed Mars
POS -102.1971192 -7.0124952
HEADING 348.71
ALT 2.239
AROT 97.910 13.232 -12.322
AFCMODE 7
NAVFREQ 0 0
XPDR 0
END
END_SHIPS
I see. The issue is already fixed on my local build. The fix will be deployed on the next release.Oh. In the version you have you said there was an issue where the crew meshes didn't auto load.
You can select and add cargoes using the API just like the Carrier. See the API docs.Working on a cargo vessel.
Is there a way to load cargo like the astronaut? versus loading the cargo into the scenario
I guess I will do the select the station like the slot. So you can select a slot and release,....
Yes: https://github.com/abdullah-radwan/UACS/tree/master/Sources/Vessels/CarrierIs the carrier code available? so I can use it for an example?
looking at the API doc also.