skip to content
Frictional Game Wiki
User Tools
Register
Log In
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
Register
>
Recent Changes
Media Manager
Sitemap
Trace:
hpl3:community:other:door-button-interaction
<h1>How To Connect Doors With Buttons</h1> <div class="level1"> <p> 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. </p> </div> <h2>Step 1:</h2> <div class="level2"> <p> 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 <b>"door1"</b> and the buttons <b>"button1"</b> and <b>"button2"</b>. </p> </div> <h2>Step 2:</h2> <div class="level2"> <p> Click on <b>button1</b> and select <b>Entity</b>→<b>Connections</b>. There is the field <b>"Connected Entities"</b>. There you must write <b>"door1, button2"</b>. </p> <p> Do the same for <b>button 2</b>, but here you write <b>"door1, button1"</b>. </p> <p> You will see, that through this entry you change the state of the connected entities, when you interact with a button. </p> </div> <h2>Step 3:</h2> <div class="level2"> <p> Click on the door and select <b>Entity</b>→<b>Internal State</b>. Activate the box <b>"Interaction Disabled"</b>. </p> <p> Now your door can not be opend by player interaction. Only the connected buttons can open it. </p> </div> <h2>Note:</h2> <div class="level2"> <p> This will work with most doors, <b>but there are doors in the game that require a script</b>. For these you need to write a <b>callback function</b> and call it under both buttons <b>Entity</b>→<b>Basic Callbacks</b>. </p> <p> There is a field called <b>"ConnectionStateChangeCallback"</b>. Place your functions name there and it will be called whenever the button is pressed. </p> </div> <h2>What Button's Work?</h2> <div class="level2"> <p> The buttons and switches can be accessed by selecting <b>Entities</b> in the <b>Level Editor</b> and by clicking <b>Station</b>→<b>Panels</b>. </p> <p> Experiment with different buttons to see which one is most suitable for your level. The most commonly used button in SOMA is <b>theta_panel </b> and <b>theta_panel_front</b>. These are located in Entities, Station and Panels. Other doors like the <b>Bulkhead doors</b> from Upsilon would work well with the <b>panel_large_inside</b> button. </p> </div> <h2>Sources:</h2> <div class="level2"> <p> <b>HPL3 Tutorials Part 3 Creating a Map</b> - <a href="https://www.youtube.com/watch?v=TGhwsa1k1LU" class="urlextern" title="https://www.youtube.com/watch?v=TGhwsa1k1LU" rel="nofollow">https://www.youtube.com/watch?v=TGhwsa1k1LU</a> </p> </div>
hpl3/community/other/door-button-interaction.txt
· Last modified: 2016/04/10 14:59 by
thedoctorpoo
Page Tools
Show page
Old revisions
Backlinks
Export to PDF
Back to top