Ok I'm not sure. What I did was to link the UmmU example cpp and change the vessel from Shuttlepb to ML. My vessel.
so you get this: I had to change the ShuttlePB to ML because that ShuttlePb is not a class.
If I copy pieces from this example and add it into my vessel cpp the Ummu doesn't work as I get that error to reinstall.
So I'm not sure how to add this to my vessel
this is just the first part:
#include "ML.h"
///////////////////////////////////////////////////////////////////////////////////////////
//
// WELCOME IN Universal MMU SDK 1.5 EXAMPLE (©Daniel Polli aka Dansteph - Orbiter part ©Martin Schweiger)
// ****************************************
//
// Coding and Using UMmu in your addon is pretty simple, just follow careffuly what is done below
// and do the same in your project, code is fully commented. For more details about each function
// and to find more usefull functions not listed here see "UMMuSDK.h" header.
//
// HOW TO USE THIS EXAMPLE ?
// *************************
// Copy the whole folder "UMmu_ShutllePB_Example" into "sample" directory of Orbiter SDK
// load project in VC++.
// At compilation it will create a "UMmuML.dll" in release or debug format that
// you must copy to "modules" directory of Orbiter. Use the scenario "_UMmu_SDK_Demo"
// to see your change.
//
// HOW TO USE UMMU SDK IN YOUR PROJECT ?
// *************************************
// include "UMmuSDK.lib" and "UMmuSDK.h" in your project declare header with "#include UMmuSDK.h" call initialisation
// functions, add members to your crew, use Information function to let the user select wich member
// he select and eva on panel or by key and you're set. See "UMmu_ML_Example" example distributed with
// this SDK, it have a lot of complete comment.
//
// Have fun,
//
// DanSteph March 2007
//
http://orbiter.dansteph.com//
///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
// clbkSetClassCaps function of Orbiter !REQUIRED!
// ----------------
// This code below SHOULD be put in "clbkSetClassCaps" Orbiter's function of your vessel
// I made here a separate function called by "clbkSetClassCaps" for more readability.
//
// initialisation of Ummu goes here
// the Ummu class variable "Crew" must be declared in your vessel's class body.
// (see ML.h "UMMUCREWMANAGMENT Crew;")
///////////////////////////////////////////////////////////////////////////////////////////
void ML::clbkSetClassCaps_UMMu(void)
{
//--------------------------------------------------------------
// InitUmmu
// initialisation of Ummu must be done first ! return of 1 mean OK
// return of -999 mean Ummu addon is not installed in user's Orbiter, return of -1
// mean misc error. If error simply all function will fail silently
// and there will be no MMu. It's a good idea to warn the user. (see bottom of listing "clbkVisualCreated")
UmmuSdKInitReturnCode=Crew.InitUmmu(GetHandle());
//--------------------------------------------------------------
//--------------------------------------------------------------
// GetUserUMmuVersion
// this check wich version of UMmu addon the user have in his orbiter directory.
// this may be usefull for future version with more function so you can check
// if user installation support the new functions. Return -1 on error (not installed, version cannot be read)
// or version number in float value (ie: 1.5="1.5" version etc etc)
float UMmuVersion=Crew.GetUserUMmuVersion();
//--------------------------------------------------------------
// DefineAirLockShape
// We set the airlock shape and state, this virtual box will be the one
// into were a Ummu asking to reenter will be taken in account
// first parameter is airlock door state (OPEN=TRUE) and other are X,X1,Y,Y1 and Z,Z1
// min and max coordinate for this virtual box (vessel local coordinate)
// Pay attention to reenter when landed (if suitable) and make the box large enough so
// it's not a pain for the user to find airlock's entry.
Crew.DefineAirLockShape(TRUE,-1,1,-1,3,-2,4); // Airlock open, 2 meter large 4 meter high 6 meter long (vessel local
coordinate)
//--------------------------------------------------------------
// SetMembersPositionOrientationOnEVA
// We define here were the Ummu will appear when they make an EVA
// first parameter is position second is orientation, take care not to make
// them appear to high on ground (will fall and die) or to low (Orbiter "light speed" bug)
Crew.SetMembersPosRotOnEVA(_V(0,0,3),_V(0,0,0)); // 3 meters in front of ship (z) facing direction of ship (vessel local
coordinate)
//---------------------------------------------------------------
// finally set the maximum seat available in this ship, default is
// 8 but it can go from 1 to 100
// BAD IDEA: using this to "close" your ship, use "SetAirlockDoorState" instead.
Crew.SetMaxSeatAvailableInShip(4);
//------------------------------------------------------------------
// IMPORTANT
// at this point Ummu is ready to be used (appart save/load see below "clbkSaveState" "clbkLoadStateEx")
// we'll add below some >default< crew member for when the ship is spawned by Orbiter's
// scenerio editor. (As there is no "scn" scenario loading in this case, your ship would have no crew)
// pay attention that if a scenario is loaded the members added here will be deleted first.
// You can also add new members at any time during runtime.
// IDEA: Make here a selection of random name, crew, number age, etc etc. Up to you,
// each scenario created dynamically would have then a different crew.
//------------------------------------------------------------------
//--------------------------------------------------------------
// AddCrewMember
// We'll add four members, parameters are name, age, cardiac pulse,weight (in kilogramm)
// notice a fourth optional parameter exist wich allow you to set misc data of
// max four characters, usefull if you want to distinguish your members for any purpose
// (eg: "Capt"=captain "Eng" =engineer "UK" nationality etc etc)
// You can add up to 100 crew members in your ship, take care your Vessel's empty mass will be updated
// automatically with crew's weight (you can disable this feature see header)
// Return 1 on success -1 on error (probably vessel full, name>25 char
// age, pulse or weight out of realistic range or MiscID>4 char)
// IDEA: Use the MiscID parameter to EVA with different spacesuit (captain,girl,english people etc etc)
Crew.AddCrewMember("Peter Falcon",41,65,74,"Capt"); //(for name and id a-z A-Z 0-9 characters only)
Crew.AddCrewMember("Fanny Gorgeous",27,67,55,"Eng"); //(for name and id a-z A-Z 0-9 characters only)
Crew.AddCrewMember("George HealGood",15,70,45,"Doc"); //(for name and id a-z A-Z 0-9 characters only)
Crew.AddCrewMember("Albert Jr Falcon",15,70,45); //(for name and id a-z A-Z 0-9 characters only)
// this variables below are used by the simple user text interface used in this demo
// see function "SendFocusScreenMessage" below for explaination.
strcpy(cOurMessage,"");
}