See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: airlock open/close  (Read 2829 times)

0 Members and 1 Guest are viewing this topic.

Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
17 August 2012, 16:01:12
This is bothering me.  

I can get the airlock to open/close.  But when the Ummu opens the door I want the airlock to be open also.  So if you press D the door opens and the airlock is open.



   
Code: [Select]
Crew.DefineAirLockShape(FALSE,-7,4,-5,3,-10,10); //airlock closed    

Code: [Select]
if(key==OAPI_KEY_D&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
{

Crew.SetAirlockDoorState(!Crew.GetAirlockDoorState());
RevertDOOR();
//display state
if(Crew.GetAirlockDoorState()==TRUE)
strcpy(SendHudMessage(),"Airlock is now open");
else
strcpy(SendHudMessage(),"Airlock is now closed");
}


Code: [Select]
if(ActionAreaReturnCode==0)
{
RevertDOOR();
}



Offline SolarLiner

  • Global Moderator
  • Legend
  • *****
  • Posts: 2769
  • Country: France fr
  • Karma: 55
  • a été remercié par Le Créateur
Reply #1 - 17 August 2012, 16:25:47
You should add this on the "ActionAirlockReturnCode" trigger:
Code: [Select]
if(ActionAreaReturnCode==0)
{
RevertDOOR();
Crew.SetAirlockDoorState(!Crew.GetAirlockDoorState());
}



Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #2 - 17 August 2012, 18:30:52
Thanks.  That fixed it


Offline SolarLiner

  • Global Moderator
  • Legend
  • *****
  • Posts: 2769
  • Country: France fr
  • Karma: 55
  • a été remercié par Le Créateur
Reply #3 - 17 August 2012, 19:43:45
I can explain the "bug" by say that typing "D" key will operate the "RevertDOOR()" function, and the swap airlock state, but in the UMmu Action Area you just use the Revert Door function.



Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #4 - 06 September 2012, 17:11:38
Thanks.  I can get the animation to save and load but how do you get the airlock state to save and load?

« Last Edit: 06 September 2012, 17:11:38 by gattico »