So we know how to make terrain, and we know how to make grids. Getting from one terrain to another is easy, just put the two regions right next to each other. Connecting terrain to a grid or a grid to a grid is a little more complicated. For that, we need to use portals. Portals are essentially just doors from one region to another. Another way to move the player character around is to teleport to a specific point via a teleport trigger.
- Open up the Editor
- Select the mod project Tutorial08
- Open the region 'Tutorial-Connecting_To_Dungeons_Terrain.lvl' in Editor Mode. You'll see that it has a terrain region and a grid region. The terrain region has a cave sticking into a cliff face.
Creating A Portal
Portals are built into certain types of objects. One of those objects is 'records -> underground -> naturalcave -> greecedngentrance_a01_ext.dbr', which is the cave object buried in the cliff face in the terrain region. That's one of the portals we'll be linking, but we still have to create one on the grid.
- Select the grid tool.
- Click on the grid region 'Tutorial-Connecting_To_Dungeons_Dungeon.lvl'. One way to create a portal on a grid is to drop an object that contains a portal, as one would on a terrain region. However, portals are also built into many grid features.
- You will notice a chunk of floor missing. You must place the cave entrance feature on a spot that has no floor.
- Select GreeceNatCave_EntranceG_Int01 from the feature list.
- Place it in the gap. When you first place the entrance, it may be orient wrong. To rotate it, press the left or right arrow key and click to place it again. The arrow keys rotate the feature placement 90 degress, but you must place the feature again to see the rotate.
Linking Two Portals
- Select the portal tool.
- Click the higher ellipsis in the Link Portals Pane.
- Select the portal at the cave entrance in the cliff on the terrain region. You will not be selecting the object itself, but the actual hole inside of the object.
You will notice a Portal number appear in the field next to the ellipsis.
- Click the lower ellipsis in the Link Portals Pane.
- Click on the plane on the open end of the entrance feature in the cave on the grid region. Rotate the camera so you are inside the cave, looking at the entrance feature.
You will notice another portal number appear in the field next to the lower ellipsis.
- Click the 'Link' button in the Link Portals Pane.
Over each of the portals, the name of the terrain on which they are located will appear. Now the portals are linked.
- Rebuild All Pathing and Rebuild All Maps for the sake of good habits.
- Save All.
- Open up the Art Manager.
- Find and Build 'Tutorial-Connecting_To_Dungeon.map' in the 'Tutorial08\assets' folder. Now, if you play the map in game, the Portals are connected. Run the character into one of the portals, and the character appears at the linked portal.
Hints for Linking Portals
|See Connecting Grids for more tips on successful portal connections.|
Another way to move the player around the map is through teleportation. The user can be teleported via a trigger using the 'Teleport Player to N., N., N. )' action in the Quest Editor (Don't worry, I'll explain all about actions in the next tutorial). But how does one obtain the correct coordinates to teleport to?