User Tools

Site Tools


hpl3:community:other:door-button-interaction

Link to this comparison view

Next revision
Previous revision
hpl3:community:other:door-button-interaction [2015/10/29 17:11]
kanthos created
hpl3:community:other:door-button-interaction [2016/04/10 14:59] (current)
thedoctorpoo [What Button's Work?]
Line 1: Line 1:
 +====== How To Connect Doors With Buttons ======
 +
 This quick tutorial will show you how to create a door, that can be opened and closed via two buttons, that change their state, when pressed. This quick tutorial will show you how to create a door, that can be opened and closed via two buttons, that change their state, when pressed.
  
-**Step 1:**+===== Step 1: =====
  
-Open the level-editor and create a map with a door and a button on each side of the door. I will call the door "​door1"​ and the buttons "​button1"​ and "​button2"​.+Open the level-editor and create a map with a door and a button on each side of the door. I will call the door **"​door1"​** and the buttons ​**"​button1"​** and **"​button2"​**. 
 +===== Step 2: =====
  
-**Step 2:**+Click on **button1** and select **Entity**→**Connections**. There is the field **"​Connected Entities"​**. There you must write **"​door1,​ button2"​**.
  
-Click on button1 and select Entity->​Connections. There is the field "​Connected Entities"​. There you must write "​door1,​ button2"​. +Do the same for **button 2**, but here you write **"​door1,​ button1"​**.
- +
-Do the same for button 2, but here you write "​door1,​ button1"​.+
  
 You will see, that through this entry you change the state of the connected entities, when you interact with a button. You will see, that through this entry you change the state of the connected entities, when you interact with a button.
  
-**Step 3:**+===== Step 3: ===== 
 + 
 +Click on the door and select ​**Entity**→**Internal State**. Activate the box **"​Interaction Disabled"​**. 
 + 
 +Now your door can not be opend by player interaction. Only the connected buttons can open it. 
 + 
 +===== Note: =====
  
-Click on the door and select ​Entity->​Internal State. Activate the box "​Interaction Disabled"​.+This will work with most doors, **but there are doors in the game that require a script**. For these you need to write a **callback function** ​and call it under both buttons **Entity**→**Basic Callbacks**.
  
-Now you door can not be opend by player interactionOnly the connected buttons can open it.+There is a field called **"​ConnectionStateChangeCallback"​**Place your functions name there and it will be called whenever the button is pressed. 
 +===== What Button'​s Work? =====
  
-**Note:**+The buttons and switches can be accessed by selecting ​**Entities** in the **Level Editor** and by clicking **Station**→**Panels**.
  
-This will work with most doors, but there are doors in the gamethat require a skript. For these you need to write a callback function ​and call it under both buttons Entity->​Basic Callbacks.+Experiment ​with different buttons to see which one is most suitable for your level. The most commonly used button in SOMA is **theta_panel ** and **theta_panel_front**. These are located ​in EntitiesStation ​and Panels. Other doors like the **Bulkhead doors** from Upsilon would work well with the **panel_large_inside** button.
  
-There is a field called "​ConnectionStateChangeCallback"​. Place your functions name there and it will be called whenever the button is pressed.+===== Sources: =====
  
-Best of luck :D+**HPL3 Tutorials Part 3 Creating a Map** - [[https://​www.youtube.com/​watch?​v=TGhwsa1k1LU|https://​www.youtube.com/​watch?​v=TGhwsa1k1LU]]
  
hpl3/community/other/door-button-interaction.1446138704.txt.gz · Last modified: 2015/10/29 17:11 by kanthos