TUTORIAL: How to connect two maps (Level Doors) - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Articles (https://www.frictionalgames.com/forum/forum-40.html) +---- Thread: TUTORIAL: How to connect two maps (Level Doors) (/thread-4782.html) |
TUTORIAL: How to connect two maps (Level Doors) - Neurological - 09-27-2010 This tutorial is gonna teach you how to connect two maps using Level Doors. For this test create two simple maps, lets call them Mymap1.map and Mymap2.map. Before starting using the Level Doors, the first thing you should do is to put the Start Player Area. This area is used to spawn the player in that position, so lets put those areas in the spot you want to spawn the player. You will have to do it for both maps, in Mymap1 place a Start Area on the point you want the player come back from the other map, to do so select Area on the left menu' and select Playerstartarea on the right menu. Now place the area in the point. On the entity inspector you can change the area name, after you put it the first time it will be given a default name, Playerstartarea_ followed by a number. For now lets change the name in PlayerSpawn2. Now open the Mymap2 and do the same thing in the spot you want the player spawn, lets call the area PlayerSpawn1. Now you have to place the Level Doors entities, what are those? The Level Door is an entity that make the player travel from a map to another by interacting with it. Go to Mymap1 and place the Level Door, to do so go to Entities on the left, and then on the right select door and then search for the doors that start with level_. Put the door in the part of the map near your Player Start point. Once you have done you will have to set some options in the Entity inspector of the door. The functions we are gonna need are: TextEntry StartPos MapFile Lets see them in detail: TextEntry - This field is needed for the door to show a text on the screen, usually to tell the player in which place the door lead. To put a text you need to create an extra lang file where all the text are stored. You can do this by following this tutorial on the official wiki: http://hpl2.frictionalgames.com/amnesia:custom_story You need to add in your lang file a new category and two new entries for our test: Code: <CATEGORY Name="Levels"> In the Level Door of Mymap1 on TextEntry you will have to put the text Mymap2_door, on Mymap2 you have to put Mymap1_door. StartPos - This is where we are gonna use the Start Player Area, you have to put the name of the area you want the player spawn on the other map. So for the Level Door of Mymap1 on StartPos you will have to put PlayerSpawn2 and on Mymap2 put PlayerSpawn1. Now the two areas are connected. MapFile - On each of the Level Door you will have to set what map to load from that door, this is needed because the game need to know in which map the starting position is. So from Mymap1 Level Door on MapFile click on the button with the three dots, now search for Mymap2.map, select it and click on Loadfile. Do the same from Mymap2 but selecting Mymap1.map. Now load your level and test it or download the test mod to see it by yourself in the editor. Test Mod: http://games.neuro-lab.net/tutorials/amnesia/leveldoors/sample/neurotut_leveldoors.zip RE: TUTORIAL: How to connect two maps (Level Doors) - fantino - 10-09-2010 Thanks a lot for this tutorial! RE: TUTORIAL: How to connect two maps (Level Doors) - Frontcannon - 10-09-2010 Nice, you should publish this in the Wiki! RE: TUTORIAL: How to connect two maps (Level Doors) - Chilton - 10-09-2010 It could use a slight bit more explaining so the person understands what theyre doing, as oppose to just copying your code with different name tags, but hell, i cant complain. You should indeed try and get this on the Wiki! RE: TUTORIAL: How to connect two maps (Level Doors) - Neurological - 10-09-2010 (10-09-2010, 12:37 PM)Chilton Wrote: It could use a slight bit more explaining so the person understands what theyre doing, as oppose to just copying your code with different name tags, but hell, i cant complain. Yeah I know, didn't know how to structure the tutorial with more technical explanation so I went the example way. I'll try to get it on the wiki. |