Taffey
04-17-2010, 07:05 AM
It may surprise you to learn that my most frequently asked question is "How do you make the automatic doors in your Space Corps levels?" Instead of replying to every PM and e-mail separately, I figured I should put together a tutorial... and here it is!
This walkthrough will show you exactly how to make the doors I have in my levels, down to the sounds and the stickers. Keep in mind that this is a general formula, and it will work in a wide variety of applications.
The Basic Structure
Before we can really get started making our door, we need to lay down a foundation. For this example, I've made a short section of hallway that you might see in a secret base somewhere, or perhaps on the way to the Space Corps cafeteria. (I hear the Friday pizza special is quite good, but stay away from the baked beans.) Don't forget to also choose an appropriate costume to get you in the mood for creating. For this tutorial I've chosen a caveman outfit, just because.
>>> Using the square paintbrush tool, draw a floor, a back wall, and two sections of ceiling with a gap in between. Notice that I have made the hallway 4 squares high:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt01.jpg
(Note: It's hard to see in these pictures, but I've made the back wall of the hallway a thick layer, which means that there is only one layer for Sackboy to run around in. As a general rule, if you don't need both layers, only use the front layer.)
The next thing we need to do is make the door. Leave the material static for now. To make the door mechanism easier to see, I've used a different color metal.
>>> Using the square paintbrush tool, draw a door between the ceiling panels that is 6 squares tall:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt02.jpg
>>> Directly above the door, draw one square of material that will serve as the anchor point for the piston. The gap between the anchor and the door should be 7 squares:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt03.jpg
You now have the basic structure you need for your door. Let's move on.
Making Your Door Move
>>> Select a piston from your popit menu and connect the door to the anchor:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt04.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt05.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt06.jpg
Depending on the specific application of your door and where you're using it, you may want to adjust the piston length. If you've built your door the exact way I've shown, however, you do not need to adjust the length. Easy, huh?
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt08.jpg
Now it's time to make your door move like it's actually a door.
>>> Select the door, press the square [ ] button, and change the material properties to dynamic:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt09.jpg
Hey look, your door moves up and down. Cool! Unfortunately, we want to control exactly when it does this, so we need to do some more work.
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt10.jpg
>>> Open your popit menu and select a "Sensor Switch", otherwise known as a player proximity switch:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt12.jpg
We are making a one way door, which means we only want it to open for Sackboy when he approaches from one side - in this case from the left. There are several ways to achieve this, but the easiest way by far is to simply offset the sensor switch to one side. This will make sense in a moment.
>>> Attach the sensor switch to the wall behind the door exactly as shown. Placement is critical!
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt13.jpg
Now we need to tweak the switch to suit our purposes. To work properly, the trigger radius needs to stop precisely at the right edge of the door. This will mean that when Sackboy reaches the other side of the door, it will shut behind him and won't reopen.
>>> Select the sensor switch and press the square [ ] button. Set the switch behavior to directional, make the switch non-visible, and adjust the trigger radius value to 11:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt14.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt15.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt16.jpg
Depending on the type of switch you are using and the particular arrangement of your door, you may or may not need to change the direction of the piston. In this case, the piston will operate opposite the way we want it to, which means it will stay open until Sackboy approaches, and then slam in his face. To change this, simply tweak the piston and change its direction.
>>> Connect the sensor switch wire to the piston and change the piston's direction to backwards:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt17.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt18.jpg
There! If you've done everything correctly, your door should stay shut as long as Sackboy is not around (hovering in Create Mode doesn't count as being around.)
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt19.jpg
Testing, Fine-Tuning, and Finishing
Ok, so you have your door built and moving. Before it will be ready to publish, you'll need to do some fine-tuning. The first thing we're going to look at is the speed of the door. If your door doesn't move at the speed you want, adjust the timing. In this case, I want the door to be a little quicker, so I'm going to adjust the timing value from 4 down to 2.
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt20.jpg
Now, to make sure we've done everything right, let's test the door. I've put stickers on the back wall so that it's more clear which direction Sackboy needs to go in order to get through the door - in this case from left to right.
>>> Drop out of hover mode, unpause the game, and test your door. If you've built it correctly, it will work like this:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt21.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt22.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt23.jpg
Fantastic, it's working properly. To prevent players from selecting the suicide option and respawning back on the left side of the door, add a checkpoint.
>>> Select a player checkpoint from the popit menu and glue it to the wall to the right of the door:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt24.jpg
Q: What kinds of doors have no sound? A: The boring ones! You don't want your door to be boring do you? No, of course you don't. Choose a sound effect you like and add it to your door mechanism. I like "Hi-tech Door", but feel free to add fart noises or anything else you like.
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt25.jpg
Make sure you get the sound object as close to the sensor switch as possible so that the timing of the sound matches the movement of the door - don't forget to tweak the trigger radius to match the sensor switch.
>>> Select a sound object from your popit menu and stick it to the wall behind the door. Get it as close to the sensor switch as possible, and make sure it is aligned vertically as well. Adjust the trigger radius to 11 and set the sound object to non-visible:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt26.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt27.jpg
Ok, it sounds like a door and it acts like a door, but it looks like a block on a piston. Let's dress this up a little.
>>> Select an appropriate material and draw a thin layer in front of the door mechanism to conceal the inner workings:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt28.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt29.jpg
To really finish things off, material change the door to match the rest of your background, slap on some stickers, and add a camera zone:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt30.jpg
The Finished Product:
That's it, we're all done! Switch to play mode and enjoy the results:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt31.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt32.jpg
Congratulations, you've made a fully-functioning automatic door.... but where it leads is up to you. It's so easy a caveman could do it. :p
This walkthrough will show you exactly how to make the doors I have in my levels, down to the sounds and the stickers. Keep in mind that this is a general formula, and it will work in a wide variety of applications.
The Basic Structure
Before we can really get started making our door, we need to lay down a foundation. For this example, I've made a short section of hallway that you might see in a secret base somewhere, or perhaps on the way to the Space Corps cafeteria. (I hear the Friday pizza special is quite good, but stay away from the baked beans.) Don't forget to also choose an appropriate costume to get you in the mood for creating. For this tutorial I've chosen a caveman outfit, just because.
>>> Using the square paintbrush tool, draw a floor, a back wall, and two sections of ceiling with a gap in between. Notice that I have made the hallway 4 squares high:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt01.jpg
(Note: It's hard to see in these pictures, but I've made the back wall of the hallway a thick layer, which means that there is only one layer for Sackboy to run around in. As a general rule, if you don't need both layers, only use the front layer.)
The next thing we need to do is make the door. Leave the material static for now. To make the door mechanism easier to see, I've used a different color metal.
>>> Using the square paintbrush tool, draw a door between the ceiling panels that is 6 squares tall:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt02.jpg
>>> Directly above the door, draw one square of material that will serve as the anchor point for the piston. The gap between the anchor and the door should be 7 squares:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt03.jpg
You now have the basic structure you need for your door. Let's move on.
Making Your Door Move
>>> Select a piston from your popit menu and connect the door to the anchor:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt04.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt05.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt06.jpg
Depending on the specific application of your door and where you're using it, you may want to adjust the piston length. If you've built your door the exact way I've shown, however, you do not need to adjust the length. Easy, huh?
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt08.jpg
Now it's time to make your door move like it's actually a door.
>>> Select the door, press the square [ ] button, and change the material properties to dynamic:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt09.jpg
Hey look, your door moves up and down. Cool! Unfortunately, we want to control exactly when it does this, so we need to do some more work.
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt10.jpg
>>> Open your popit menu and select a "Sensor Switch", otherwise known as a player proximity switch:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt12.jpg
We are making a one way door, which means we only want it to open for Sackboy when he approaches from one side - in this case from the left. There are several ways to achieve this, but the easiest way by far is to simply offset the sensor switch to one side. This will make sense in a moment.
>>> Attach the sensor switch to the wall behind the door exactly as shown. Placement is critical!
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt13.jpg
Now we need to tweak the switch to suit our purposes. To work properly, the trigger radius needs to stop precisely at the right edge of the door. This will mean that when Sackboy reaches the other side of the door, it will shut behind him and won't reopen.
>>> Select the sensor switch and press the square [ ] button. Set the switch behavior to directional, make the switch non-visible, and adjust the trigger radius value to 11:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt14.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt15.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt16.jpg
Depending on the type of switch you are using and the particular arrangement of your door, you may or may not need to change the direction of the piston. In this case, the piston will operate opposite the way we want it to, which means it will stay open until Sackboy approaches, and then slam in his face. To change this, simply tweak the piston and change its direction.
>>> Connect the sensor switch wire to the piston and change the piston's direction to backwards:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt17.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt18.jpg
There! If you've done everything correctly, your door should stay shut as long as Sackboy is not around (hovering in Create Mode doesn't count as being around.)
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt19.jpg
Testing, Fine-Tuning, and Finishing
Ok, so you have your door built and moving. Before it will be ready to publish, you'll need to do some fine-tuning. The first thing we're going to look at is the speed of the door. If your door doesn't move at the speed you want, adjust the timing. In this case, I want the door to be a little quicker, so I'm going to adjust the timing value from 4 down to 2.
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt20.jpg
Now, to make sure we've done everything right, let's test the door. I've put stickers on the back wall so that it's more clear which direction Sackboy needs to go in order to get through the door - in this case from left to right.
>>> Drop out of hover mode, unpause the game, and test your door. If you've built it correctly, it will work like this:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt21.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt22.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt23.jpg
Fantastic, it's working properly. To prevent players from selecting the suicide option and respawning back on the left side of the door, add a checkpoint.
>>> Select a player checkpoint from the popit menu and glue it to the wall to the right of the door:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt24.jpg
Q: What kinds of doors have no sound? A: The boring ones! You don't want your door to be boring do you? No, of course you don't. Choose a sound effect you like and add it to your door mechanism. I like "Hi-tech Door", but feel free to add fart noises or anything else you like.
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt25.jpg
Make sure you get the sound object as close to the sensor switch as possible so that the timing of the sound matches the movement of the door - don't forget to tweak the trigger radius to match the sensor switch.
>>> Select a sound object from your popit menu and stick it to the wall behind the door. Get it as close to the sensor switch as possible, and make sure it is aligned vertically as well. Adjust the trigger radius to 11 and set the sound object to non-visible:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt26.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt27.jpg
Ok, it sounds like a door and it acts like a door, but it looks like a block on a piston. Let's dress this up a little.
>>> Select an appropriate material and draw a thin layer in front of the door mechanism to conceal the inner workings:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt28.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt29.jpg
To really finish things off, material change the door to match the rest of your background, slap on some stickers, and add a camera zone:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt30.jpg
The Finished Product:
That's it, we're all done! Switch to play mode and enjoy the results:
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt31.jpg
http://i900.photobucket.com/albums/ac207/tross13/Automatic%20door%20tutorial/adt32.jpg
Congratulations, you've made a fully-functioning automatic door.... but where it leads is up to you. It's so easy a caveman could do it. :p