The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TUTORIAL: How to connect two maps (Level Doors)
Neurological Offline
Member

Posts: 71
Threads: 11
Joined: Sep 2010
Reputation: 1
#1
TUTORIAL: How to connect two maps (Level Doors)

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_.

[Image: doorselect.jpg]

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

[Image: doorentity.jpg]

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:

<CATEGORY Name="Levels">

    <Entry Name="Mymap1_door">Mansion [br]To The First Map</Entry>
    <Entry Name="Mymap2_door">Mansion [br]To The Second Map</Entry>

</CATEGORY>
[/code]

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.

[Image: mapsummary.jpg]

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/amn...ldoors.zip

Neurological - Music Entertainment
http://www.neuro-lab.net
09-27-2010, 12:26 PM
Find


Messages In This Thread
TUTORIAL: How to connect two maps (Level Doors) - by Neurological - 09-27-2010, 12:26 PM



Users browsing this thread: 1 Guest(s)