Seamless Level Transitions | W A V E L E N G T H |
![]() |
by AK-47 | November 25, 1999 |
![]() |
|
|
![]() |
Howdy, and welcome to the seamless level transitions tutorial. What are seamless level transitions, you ask? Well, simply put, they are just a switch to another map (.bsp) from the one you are in now. What are the advantages of seamless level transitions? First of all, you can keep a map small in size (which makes it run faster in game and makes it easier to work on in Worldcraft), and still keep the feeling of going through a single huge, continuous level. Secondly, because the maps are kept smaller, the loading times are normally less than 10 seconds. Finally, monsters and other NPCs can pass through level transitions as well. In summary; seamless level transitions are great :) "So how do I use them?" you might ask. That's what this tutorial is here for. All the actions I want you to perform in Worldcraft are colored yellow.
First let me go a little more in-depth on the workings of a seamless level transition. Remember, when making a level transition there are going to be two different .BSPs. However, one area of each map is going to be EXACTLY identical (you should if you want the player to seem like he's still in the same location after loading). There are three entities involved in transitions: trigger_changelevel, trigger_transition, and info_landmark. Below I will describe the significance and functions of each entity, and afterwards we'll actually begin to create a level transition in Worldcraft.
trigger_changelevel : This is the entity that actually initiates the level change process. Trigger_changelevel is a brush-based entity, meaning it must be tied to a solid. The moment the player touches this brush, the level is changed. It's KEYS are outlined below:
As for the FLAGS:
trigger_transition : This entity defines the area that the changelevel affects. This may sound strange to you at first. Any NPCs or monsters inside or touching the trigger_transition when the level is changed will also be switched to the other level as well as the player. The trigger_changelevel entity must be inside a trigger_transition entity in order for the transition to take place. Generally, if the transition is in a hallway, you'd want the trigger_transition to cover nearly all the viewable area of the hallway so NPCs don't disappear when the level is changed. Trigger_transition is also a brush-based entity. There's only one KEY, and that is Name. As with the trigger_changelevel, it should have the same name as the info_landmark. A level transition does not require a trigger_transition; you should only use this when there is a possibility that an NPC will be switching the map with you. To keep this tutorial a tad shorter, we won't be putting a trigger_transition in the example map. Make sure that it's targetname is the same in both maps.
info_landmark : Info_landmark takes some explaining. To know how to use it, you have to know a little about how the level change works. When the player changed a level, he is placed in the new level in the EXACT relation to the info_landmark as he was in the last level. For example, when you leave the previous level, the game remembers you were 70 units away from the info_landmark in a certain direction. In the new level, the player will be placed the same number of units away from the landmark in the same direction. So, what this means is that you should have the landmark at the EXACT same spot in both of the levels in order to ensure a proper level transition. This doesn't mean they have to be at the same spot in WORLDCRAFT for each, just the same spot in relation to the level itself. Info_landmark also has only one KEY, and that is Name. Just keep in mind that the name you put here will also be the name of the trigger_transition and the trigger_changelevel. The info_landmarks in each level should both have the SAME name.
Ok, so now you know a lot more about each individual entity. This will really help in the actual construction of a level transition. For this example map we'll be making, the transition will occur in the middle of a hallway. A transition can happen anywhere in a map, and if you remember the Half-Life hazard course, even underwater. First, unless you want to build two levels by yourself (which of course you would be doing if you weren't following a tutorial :), I suggest you grab the tutorial 11 example map .ZIP file from the files page. There are two .ZIP files for this tutorial; one for the beginning, empty maps, and one for the final product that we will reach at the end of this tutorial. Right now, grab the START .zip file. In that .ZIP I have included two pre-constructed example maps for use in this tutorial. Each of the maps contain no entities, we'll be adding those. The maps are named tut1.bsp (the map the player starts in) and tut2.bsp (the map the player will transition to). Of course, using the power of Valve's level transition abilities, the player will be able to walk back and forth between levels as he wishes. Once you have downloaded and extracted the .ZIP file, open tut1.bsp in Worldcraft.
If you take a look at tut1.bsp, you will see an extremely simple hallway with the number 1 labeled at either end. Otherwise, there's nothing else to see. Open tut2.bsp. You will see the exact same map, only now there is a number two labeled at each end of the hallway. Obviously, those two numbers represent the different maps, so you can tell which map you're in. Ok, lets begin filling the maps with the appropriate entities.
Let's start with the info_landmark. Close tut2.bsp, and open tut1.bsp. Put an info_landmark smack dab in the center of the hallway on each axis. You can tell where the center of the hallway is by looking at the grey X marked at the center of each of the hallway walls and ceiling. In case you have the Xs turned off, you can put the info_landmark at 120, -232 in the top (XY) view and 120, -64 in the side (XZ) view. Open the properties for the info_landmark and enter tutlandmark for the Name.
Click here to see where I placed the info_landmark, and how I set up the properties.
Alright, now we've gotten the landmark done for the first map. So, let's do it for the second map. Close tut1.bsp, and open tut2.bsp. Repeat the last paragraph you read, except this time put the info_landmark in tut2.bsp. For it's name, enter tutlandmark as well..
Click here to see where and how I set the info_landmark in tut2.bsp.
Great, now let's move on to adding the trigger_changelevel entity. Since we're in tut2.bsp, we might as well finish up there now. Select the Brush Creation Tool. Make sure the current texture is AAATRIGGER. Now, create a brush that stretches the entire width of the hallway about 112 units to the left of the info_landmark (in the TOP (xy) view). The trigger itself should be about 16 units wide. Then, stretch it in the side (XZ) or front (YZ) view from the ceiling to the floor. We now have a solid wall that the player can't avoid if he is walking down the hallway.
Look at this picture to see how I made the trigger brush.
Now it's time to set up the trigger_changelevel. Select the brush that will be the trigger_changelevel, and push the toEntity button. The properties will come up. Set the class to trigger_changelevel. For the name, enter 'tutlandmark'. For the New Map Name, enter 'tut1'. For the Landmark Name, enter 'tutlandmark'. Leave Change Target and Delay Before Change Target blank. In the FLAGS properties, make sure that No Intermission IS checked, and USE Only is NOT. There's one thing left to do, however. Place an info_player_start in tut2.bsp. "Why have an info_player_start if you're just going to be switching to the map?" you ask? Well, the main reason is that every map requires an info_player_start, and what if the player open tut2.bsp directly from the console? So, let's put one in. Place an info_player_start at the right side of the hallway (in the TOP (xy) view) and make sure he is about 8 units from the ground in the side (yz) view. You'll notice that the targetname for the trigger_changelevel is the same as the targetname for the info_landmark.
Here's how I placed the info_player_start.
Tut2.bsp is done! So, let's finish up tut1.bsp. Save and close tut2.bsp, and open tut1.bsp. We're basically going to repeat the last paragraph here. Only, the following changes will be made: first of all, the trigger_changelevel will be placed to the right of the info_landmark. Secondly, the New Map Name will be 'tut2'. Finally, the info_player_start will be placed at the left side of the hallway. All the names are to remain the same.
This is how tut1.bsp should look once you have finished that step..
Well, that's pretty much it! As a last step, let's put in some lights in each of the maps so that we can see. Put one light entity in the center of each map, towards the ceiling. Open each light's properties, and set the brightness to 300. Make sure that both maps are correctly set up and saved. Here are two pictures of the final, complete maps:
Tut1.bsp completed
Tut2.bsp completed
Now, go ahead and compile them.***IMPORTANT***: there seems to be a bug where level transitions won't work if the map is automatically opened in Half-Life after compiling. Therefore, if you compile through Worldcraft, make sure that Don't Run The Game IS checked. If you use a different compiler, enable the same sort of feature, or if it asks you to push a button after compiling to run the map, don't do it. After the maps are compiled, open Half-Life, open the console, and type 'map tut1'. You will be standing in the hallway with the number 1 at either end. Go ahead and walk forward, and witness the magic! :)
If something goes wrong, make sure that all the names are the same in each map (remember that the two info_landmarks share the same name, as well as the trigger_changelevels). Most likely, if you entered a wrong name somewhere, you will end up stuck outside of the level. If you end up partially stuck in the floor, it is because the info_landmarks aren't in the exact same spot on each map. Check the coordinates of one of the info_landmarks, and then make sure the other info_landmark is at the same spot.
This concludes the seamless level transitions tutorial. Hopefully, after following this, level transitions should be a breeze to create. They're actually quite easy, once you get the hang of it. You can download the completed maps from the files page, as well as the downloadable, printable version of this tutorial. Until next time!
AK-47's email address is ak47wavelength@hotmail.com
![]() |
Half-Life, and the Half-Life logo are trademarks of Valve Software and Sierra Online, used with permission. All screenshots and drawings of Half-Life are (c) copyright Valve Software, 1998. All rights reserved. All original content (text and art) are (c) copyright Wavelength, 1998, and may not be reproduced without permission. |