Difference between revisions of "Tutorial: Adding Airlocks and Ladders to Parts"

From Kerbal Space Program Wiki
Jump to: navigation, search
(And all done!)
(Step 3 - Identifying airlocks and ladders -- layer 21 must be set for ladder to work...)
Line 31: Line 31:
  
  
Select your ladder or airlock mesh and add new tags by going into the TagManager and choosing "Ladder" and "Airlock" tags. In the same menu name one of the User Layers "Part Triggers".
+
Select your ladder or airlock mesh and add new tags by going into the TagManager and choosing "Ladder" and "Airlock" tags. In the same menu name one of the User Layers "Part Triggers".  
  
 +
UPD by Tosh: It seems that ''"Part Triggers"'' name '''must''' be given to '''layer 21'''. Otherwise it ain't working'.
  
 
===Step 4 - Adding airlocks and ladders===
 
===Step 4 - Adding airlocks and ladders===

Revision as of 15:58, 3 August 2012

Adding Airlocks and Ladders to Parts

This tutorial will teach you how to add airlocks your your Kerbonauts to access, and ladders for them to climb, directly to parts like what is done with the current command modules. This will work for any part, not just command pods.

Specifications

  • Length: 10-15 minutes
  • Difficulty: Moderate
  • For version: 0.16 and above

Steps

Step 1 - Create Ladder and Airlock Boxes

Add a simple box for your Ladders and/or airlocks in a modeling software of your choice.


Step 2 - Set up Unity

Importing the new 0.16 parttools

Load up the unity editor and import the new parttools, then import your model and textures. After this, parent your model to a Gameobject with the KSP parttools components.


Step 3 - Identifying airlocks and ladders

Adding new tags


Select your ladder or airlock mesh and add new tags by going into the TagManager and choosing "Ladder" and "Airlock" tags. In the same menu name one of the User Layers "Part Triggers".

UPD by Tosh: It seems that "Part Triggers" name must be given to layer 21. Otherwise it ain't working'.

Step 4 - Adding airlocks and ladders


Select your airlock/ladder mesh and set the Tag to Airlock/Ladder and Layer to Part Triggers. Afterwards, delete the meshrender and make it a mesh collider, just like you would make a node_collider.


Setting tags


Tick the "Is Trigger" tickbox, and write with the parttools component as usual.


Step 5 - Final Touches

Add "CrewCapacity = # to your .cfg to define the total number of crew members that may enter.

And all done!

Now you should be able to use your ladders and airlocks in-game!

Tutorial created by DYJ.