Single player, multiple starting points

I’m tryting to understand what data can be sent between levels, and if it is actually possible.

Let’s say that we have 4 maps, and multiple trigger boxes in them. When the user character overlaps with a trigger box, a new level will be loaded. The problem in here is that, I want to move the character to a different starting point for each trigger box.

 ┌───────Something like this...────────┐
 │                                     │
 │              ┌───────┐              │
 │              │       │              │
 │       ┌─────▶│  L #2 │◀─────┐       │
 │       │      │       │      │       │
 │       │      └───────┘      │       │
 │       ▼          ▲          ▼       │
 │   ┌───────┐      │      ┌───────┐   │
│   │       │      │      │       │   │
│   │  L #4 │◀─────┼─────▶│  L #1 │   │
│   │       │      │      │       │   │
│   └───────┘      │      └───────┘   │
│       ▲          ▼          ▲       │
│       │      ┌───────┐      │       │
│       │      │       │      │       │
│       └─────▶│  L #3 │◀─────┘       │
│              │       │              │
│              └───────┘              │
│                                     │
└─────────────────────────────────────┘

So, when the character enters to a portal, he/she will appear to the corresponding starting point.
I’m using “Open Level” to move between maps, but I have no idea on how to tell the level which starting point to use.

Is this achievable from blueprints?

PS. Without streaming levels…

I would set this in the game instance, actually, or perhaps on the player character. Possible methods:

Map Each entry point in a level to an int, and then map the corresponding exit. (Similar to the way Muds used to code room doors. (N,NE,E,SE,S,SW,W,NW,U,D = 8,9,6,3,2,1,4,7,-,+). Of course, here you could something more sophisticated like MapID = #### EntryID=####.

Another possibility would be to use string names, which would be much more readable, but a little trickier to implement.

On level load, get the current EntryID, match it to the corresponding spawn point, and set character position to that point.

At the end I did somewhat a similar thing, but using C++ in some parts.

Created two ENUMs in C++. Which uses int as values but can be shown as text on blueprint, so data becomes readable for designer (I also have a static method to convert levelname <=> int). One enum includes all level ids, second target points for transporting the character.

I’m also keeping the previous level, previous portal name for reference.

So, if the player moves from one level to another, I both know the portal and level he/she came from. So, with checking two enums, I’m able to find which target point to transport the player to.

Thanks for the tip on using the game instance. I’ll be moving the variables from C++ and get rid of the enums :slight_smile: