0 Members and 1 Guest are viewing this topic.
if(ActionAreaReturnCode==0) { if (DOOR2_proc==0){ //OUTERAIRLOCK RevertOUTERAIRLOCK();} if (DOOR2_proc>0) strcpy(SendHudMessage(),"Inner Airlock Open"); }
strcpy(SendHudMessage(),"Inner Airlock Open");
if((ActionAreaReturnCode==0)&&(DD1_proc>0)) { SendHudMessage("Inner Airlock Open"); }
Bibi Uncle wrote:I'm not quite sure to understand your program when you do this :Code: [Select]strcpy(SendHudMessage(),"Inner Airlock Open");strcpy copy "Inner Airlock Open" in SendHudMessage(). But SendHudMessage is a function, not a character table (I don't how you say this in English. I talk about something like "char cText[256]".Why don't you simply write SendHudMessage("Inner Airlock Open"); ?
Bibi Uncle wrote:Sorry, I completely miss myself with the Orbiter API. This is a UMMu function.I look a bit on the web (because I don't have any UMMu add-on for now and my HD is full) and I found out that what you did is good. http://orbiter-forum.com/showthread.php?p=206004The function is a bit weird, but it works like that.Where do you have this message : Crew.DeclareActionArea(0,_V( 66.2794,0, 11.61512),3,TRUE,"action_door.wav","Outer Airlock Active"); ?In the HUD, a DebugString (little white rectangle at the bottom of the screen) or something else ?
void TPAD::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 function "WarnUserUMMUNotInstalled" below) 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: 2.0="2.0" 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. (See PDF doc) Crew.DefineAirLockShape(FALSE,20,40,-1,3,-3,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(22.5,.76,1.1),_V(0,-1.5,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(25); //---------------------------------------------------------------- // OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL // DeclareActionArea // Ever wanted to be able to open a door, repair a system or trigger something in your vessel from an UMMU ? // Here come a new feature of UMMU 2.0: Action area. See UMmuSDK.h and PDF doc for complete explanation and see // "DetectActionAreaActivated" below. Crew.DeclareActionArea(0,_V( 25.837,0,-.344),3,TRUE,"action_door.wav","Outer Airlock Active"); Crew.DeclareActionArea(1,_V( 19.079 ,0, -.344),2,TRUE,"action_door.wav","Inner Airlock Active"); Crew.DeclareActionArea(2,_V( 9.93,0,0),6,TRUE,"action_door.wav","Travel Tube Doors Active"); //Crew.DeclareActionArea(3,_V(0,0,-5),2.5,TRUE,"action_activated.wav","You are behind the ship"); //iActionAreaDemoStep=0; // this is just to show a feature of action area, see below "DetectActionAreaActivated" //-------------------------------------------------------------- // AddCrewMember // We'll add four default members for when the ship is spawned by Orbiter's scenario editor. // parameters are name, age, cardiac pulse,weight (in kilogramm) and Function (Misc ID) // max four characters wich define the spacesuit used. (see UmmuMiscID in UMuSDK.h 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) 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) SelectedUmmuMember =0; // our current selected member // The HUD display method variables, see PDF doc cUmmuHudDisplay[0] =0; // Initialisation of UMmu hud char variable dHudMessageDelay =0; // Initialisation of UMmu delay variable strcpy(SendHudMessage(),"Welcome aboard ! E=EVA 1,2=select UMmu D=Open/Close airlock S=info M=add crew"); // The Add mmu without scenery editor variable see PDF doc cAddUMmuToVessel[0]=0;}