The Ship Basics: Interactions

From Valve Developer Community
Jump to: navigation, search
Note.pngNote:For the sake of this article, # represents any arbitrary number.

Creating Doors

  1. Create a prop_door_rotating and set its World Model to a door.
  2. Name it Door_#
  3. Place it in your doorway
  4. Make a brush that completely surrounds the door with the material tools/toolsinteractive
  5. Select the brush and make it a ship_base_interaction
    1. Set its Parent keyvalue and Target Entity keyvalue to Door_#
    2. Set its Context Sensitive Interface Menu to Door
    3. Set its Default Action to Open

Hopefully this sheds some light on how interactions work; to be more productive, use the door prefabs included in The Ship SDK.

Creating Cabinet/Wardrobe

  1. Create a ship_container named Dresser_# and choose the world model as some sort of container (e.g. a dresser)
    1. Set Container Capacity to preferred setting
    2. Set Inventory Menu Title to correspond with the model
  2. Create a brush that covers the container with the material tools/toolsinteractive
  3. Cover sides that should not be interactive or are not visible with tools/toolsnoninteractive
  4. Make that brush into a ship_base_interaction
    1. Set its Target Entity to Dresser_#
    2. Set its Context Sensitive Interface Menu to Container
    3. Set its Default Action to Open