Entrances

Entrances are used to connect different parts of a level. We separate them into two groups: Entrances and Exits.

Entering an entrance will transport the player to a connected exit. An initial entrance is required as a starting point, as well as a mechanism to finish the level (goal flagpole or chest, for example), see Level Exit Conditions.

Different Entrance/Exit types exist, for example normal, pipe entrance, door entrance, vine entrance etc... The Special Exit Controller (SEC) creates an invisible box that also functions as an entrance. It is resizable.

= Terminology = The meaning for entrance and exit is swapped, if we compare it to previous game editors. People new to Reggie often get it wrong.

In previous level editors: In previous level editors, an entrance would mean to enter a zone. An exit would mean to exit a zone.

In Reggie Here, an entrance means to enter a door/pipe (causing the player to exit the zone). An exit means to exit a door/pipe (which means the player enters the zone).

As you can see, it is the exact opposite now in Reggie.

So please note: Entrances and exits are seen and named from Mario's point of view.

Entrances
 * Entrances can be entered by the player.
 * Entrances can only be one of the following types: any door entrance, any pipe entrance, and Special Exit Controller entrance (normal/vine).
 * Entrances must be set to be Enterable.

Exits
 * Exits can be exited by the player.
 * Exits can be of any type. The initial entrance as well as the midway entrance are technically exits.
 * Exits don't need Enterable ticked. The same is true for initial/midway entrances (Nintendo usually sets the "Enterable" flag on those).

= Using Entrances = Entrances are required for all levels to work properly. In this chapter we'll take a look at the most basic entrance types, and some more advanced variants. In a later chapter we'll look at all Entrance Types more closely.

We'll also learn how to use entrances to connect different parts of a level.

Overview
Switching to the Entrances palette tab allows us to add entrances to our level. Now we can right-click into the #####canvas and place a new entrance. The next freely available Entrance ID will be assigned to the entrance. For a new level, this will be Entrance ID 0.

Selecting this entrance opens up a Properties window. Here we can see the properties available for each entrance/exit:


 * The different Entrance Types. There's a whole chapter about those later in this tutorial.
 * The Entrance ID of the selected entrance/exit.
 * The Destination ID. Please see Connecting Entrances within same Area.
 * The Destination Area, see Creating Entrances to another Area
 * The Layer, on which the player will spawn. This "feature" is extremely glitchy and should never be used. It is glitchy because the player actor is not programmed to properly interact with tiles and sprites on layer 0 or layer 2.
 * The Enterable checkbox. With it we can distinguish the item to be either an Entrance (by activating that box), or an Exit (by unchecking that box). Players can only enter, when this is checked. This checkbox is irrelevant for some "special" entrance types; they work whether or not this is checked. Those are the initial entrance (starting point), the midway flag entrance, and the Special Exit Controller (SEC).

Entrance ID
The entrance ID is a number, ranging from  to , and starting again from   in each new area. An entrance ID will automatically be assigned to each entrance. More precisely, the lowest available ID will be chosen. All entrances that are placed into the level will be saved with their IDs and properties into the level .arc file.

It's possible to modify the ID of an entrance. This can be done by selecting the entrance in the canvas, and editing the ID in the Entrance Properties window. Please note: Giving multiple entrance items the same Entrance ID (within the same area) will most likely crash the game!

Info: Some entrance IDs are preferred by Nintendo, others even harcoded.

Initial Entrance
The initial entrance to the level is always in area 1. It uses entrance ID 0, unless this value is changed in Area Options. It doesn't matter in which zone this entrance is, as long as it is in area 1.

We can use any entrance type for the initial entrance. Most commonly used is type 0 (Normal), which spawns the players at the position of the entrance. No further sprites or tiles are needed.

The initial entrance should be placed 50% screen width away from the left zone border. In Reggie Preferences we can activate a red line that indicates the leftmost x-position, where the initial entrance can be placed safely.

The reason to place the entrance beyond the red line is the initial loading procedure: Mario is put on screen, and the camera is zoomed-in. The camera will then start to zoom out until reaching the intended zoom mode. In order not to interrupt the initial loading process it is recommended to place entrance ID 0 past that vertical red line. Please note that entrances only need to be placed past the vertical red line in the very first zone of your level (and in case the midway spawn point is close to the zone border). In all other zones, the camera is already zoomed out.

Creating Entrances to another Area
= Entrance Types =

Doors
= Exit Controllers =

Level Exit Controller (Switch Palace)
= Level Exit Conditions =