WEBVTT

00:08.030 --> 00:09.230
Welcome back.

00:09.230 --> 00:13.670
Now we have a couple different types of checkpoint actors.

00:13.700 --> 00:19.220
We have our typical checkpoint which saves progress when we reach it.

00:19.310 --> 00:26.480
We also have a beacon which doesn't save progress, but it is a saved actor in a sense that it implements

00:26.480 --> 00:32.480
the save interface and has a boolean marked with save game and it's you property.

00:32.480 --> 00:39.230
So even though it doesn't really cause us to save any progress, it will be saved.

00:39.840 --> 00:46.890
Now, in addition to these actors, I'd like another type of actor that's sort of related to these.

00:47.160 --> 00:49.560
I wanted to share some of their behaviors.

00:49.560 --> 00:51.750
I would like it to be highlight able.

00:51.750 --> 00:56.790
I would like to be able to click on it and move to a specified location on that actor.

00:56.790 --> 01:01.590
But once I reach that location on the actor, I want to transition levels.

01:01.590 --> 01:03.480
I want to go to a new map.

01:03.840 --> 01:09.990
So for that reason, I'm going to take our checkpoint class and subclass it into another class.

01:09.990 --> 01:13.080
And this one I'd like to subclass in C plus.

01:13.080 --> 01:13.410
Plus.

01:13.410 --> 01:20.250
We've seen that the checkpoint class is versatile enough to be able to subclass it and blueprint, and

01:20.250 --> 01:22.470
that's indeed what we did with our beacon.

01:22.470 --> 01:27.000
I'd like to subclass it in C plus plus and add a couple new things.

01:27.000 --> 01:30.270
So we're going to create a new C plus plus class.

01:30.270 --> 01:35.670
I'm going to go into the checkpoint folder and base this on our checkpoint C plus plus class.

01:35.670 --> 01:39.780
And I can call this class Map entrance.

01:40.320 --> 01:48.180
Now these are going to be used to transition from one map to another and even back to a previous map.

01:48.180 --> 01:55.800
And while we may have map entrances and map exits, a map exit is really just another map entrance,

01:55.800 --> 01:56.430
isn't it?

01:56.430 --> 01:58.710
It's going to take you to another map.

01:58.710 --> 02:02.730
So really, exits and entrances are all just entrances.

02:02.730 --> 02:05.040
So we'll call them all map entrances.

02:05.040 --> 02:07.800
And this will take us from one map to another.

02:08.220 --> 02:09.930
Let's click on Create Class.

02:09.930 --> 02:16.020
And we can go ahead and close down the engine and go to our new map entrance class.

02:16.020 --> 02:23.790
I'll go ahead and close all tabs for now and open up checkpoint map entrance dot h and open the cpp

02:23.790 --> 02:24.210
file.

02:24.210 --> 02:28.980
Now what does our map entrance need that our checkpoint does not have?

02:29.010 --> 02:33.180
Well, for one it needs to know what map we'd like to travel to.

02:33.180 --> 02:40.620
That's one thing, and another is it's going to override what happens when we overlap with its overlap

02:40.620 --> 02:41.130
volume.

02:41.130 --> 02:45.960
If we open checkpoint dot h, we'll see that we have an en sphere overlap.

02:45.960 --> 02:53.610
And we had the foresight to mark it virtual just in case future subclasses wanted to override and provide

02:53.610 --> 02:55.740
their own functionality for it.

02:56.510 --> 02:57.020
Now.

02:57.020 --> 03:01.370
In addition, we have a couple of highlight interface functions.

03:01.370 --> 03:04.850
We have highlight actor implementation Unhighlight actor.

03:04.850 --> 03:10.640
These are blueprint native events, which means we can have part of their implementation in C plus plus

03:10.640 --> 03:12.410
and part in blueprint.

03:12.410 --> 03:15.020
And that may be the case for what we want.

03:15.320 --> 03:17.450
We also have a set move to location.

03:17.450 --> 03:26.240
Now set move to location sets out destination at least in checkpoint to the location of the scene component.

03:26.240 --> 03:27.740
Move to component.

03:27.740 --> 03:34.490
That's the behavior that I still want to have in my map entrance, so I don't think we need to override

03:34.490 --> 03:35.810
that function.

03:35.870 --> 03:38.510
We can override the highlight functions though.

03:38.510 --> 03:41.180
Let's see what they're doing here in checkpoint.

03:41.180 --> 03:47.600
If we go to checkpoint, we see that we're checking B is reached before setting render custom depth.

03:47.600 --> 03:53.270
Now in the case of my map entrance, if I've already reached a map entrance and I go to another map,

03:53.270 --> 04:00.230
then say come back to that previous map, I really don't care if I've reached it, I still want to be

04:00.230 --> 04:01.550
able to highlight it.

04:01.550 --> 04:09.140
So in our case, we're going to want to remove that check be reached as I don't care if we've reached

04:09.140 --> 04:09.740
it or not.

04:09.740 --> 04:11.720
I want to highlight it regardless.

04:11.840 --> 04:16.040
So we'll go ahead and implement highlight actor and Unhighlight actor.

04:16.040 --> 04:19.370
We don't actually need to overwrite Unhighlight actor, do we?

04:19.370 --> 04:24.920
At least not in C plus plus if we don't want to, but we should override highlight actor to remove that

04:24.920 --> 04:26.480
if B reached check.

04:26.960 --> 04:34.580
So I'm going to take just all of this since I want these comments to and paste them here in a public

04:34.580 --> 04:36.890
section in my map entrance.

04:36.890 --> 04:40.400
But I'm going to remove all except for highlight actor.

04:40.400 --> 04:45.890
That's the only one that I want to override, and I'm going to generate this definition.

04:49.580 --> 04:57.620
And all I want to do is steal this checkpoint mesh set render custom depth to true from checkpoint.

04:57.620 --> 04:59.300
I'm going to put that right here.

04:59.660 --> 05:02.630
The only difference is we're no longer checking that boolean.

05:03.330 --> 05:04.680
So that's good.

05:05.300 --> 05:09.680
Now we need to think about what map entrance needs that checkpoint doesn't have.

05:09.680 --> 05:11.690
And I can think of two things.

05:11.690 --> 05:14.390
One is the map that I'd like to travel to.

05:14.390 --> 05:21.290
Once we reach this map entrance, we can call that destination map, and this can be a t soft object

05:21.290 --> 05:25.610
pointer of type Uworld and we can set this in our blueprint.

05:25.610 --> 05:28.280
We can call this destination map.

05:28.280 --> 05:31.700
And we can give this a u property with edit.

05:32.030 --> 05:36.740
I'd like it edit anywhere so we can set this on instances in the world.

05:37.190 --> 05:45.110
Another one I can think of is an F name for the player start tag that we would like to spawn in at in

05:45.110 --> 05:51.200
the other world, so this can be our destination player start tag.

05:52.040 --> 05:54.500
We can make this edit anywhere as well.

05:56.190 --> 06:03.690
So that way when we reach a map entrance and we travel to the destination map, we can spawn in at a

06:03.690 --> 06:05.310
specific player start.

06:05.310 --> 06:09.840
And that can be really anywhere we choose on this particular blueprint.

06:10.620 --> 06:16.740
So with that, the last thing here in C plus plus perhaps is our overlap function.

06:16.740 --> 06:19.920
We're going to want to override on sphere overlap.

06:19.920 --> 06:21.870
That's going to be in the protected section.

06:21.870 --> 06:25.560
So we'll go ahead and copy all of this and paste it here.

06:25.560 --> 06:27.600
We'll create a protected section here.

06:27.600 --> 06:32.040
But we can't have you function on an override.

06:32.040 --> 06:35.430
That quality of being a U function is just inherited.

06:35.700 --> 06:39.480
Now writer says light bulb add the override specifier.

06:39.480 --> 06:40.680
All right thanks writer.

06:40.680 --> 06:42.210
We'll go ahead and add that.

06:42.210 --> 06:47.580
And we'll generate the definition writers asking if I want to wrap the long line.

06:47.580 --> 06:47.790
Sure.

06:47.820 --> 06:48.540
Go ahead.

06:48.540 --> 06:51.390
And finally we can generate the definition.

06:51.390 --> 06:53.160
And we don't want to call super do we.

06:53.160 --> 06:57.090
Because super is going to let's see what it does.

06:57.090 --> 06:59.760
It's going to set breach to true.

06:59.820 --> 07:06.810
It's going to save the world state and it's going to execute, save progress and handle glow effects.

07:06.810 --> 07:12.000
Now when I reach a map entrance, saving the world state is a good idea for saving the player.

07:12.000 --> 07:14.760
Progress is also a good idea.

07:14.790 --> 07:19.020
Notice that this involves saving the player start tag as well.

07:19.350 --> 07:27.390
But the thing is, I don't necessarily want to save the player start tag of this particular checkpoint.

07:27.840 --> 07:33.600
I want to save the player start tag of the checkpoint we're going to in the other level.

07:33.990 --> 07:39.030
So we are going to want our own implementation of this, but it's going to be almost the same.

07:39.030 --> 07:44.370
We can copy this if statement and come back to map entrance and we can replace super.

07:44.370 --> 07:50.580
We don't want to call super outright, but what we can do is a modified version of this.

07:50.580 --> 07:52.410
I'm going to include player interface.

07:52.410 --> 07:55.530
We're going to check if the other player implements it.

07:56.170 --> 07:59.290
Now, if you want to save be reached, that's fine.

07:59.290 --> 08:02.440
We're not using it to prevent highlighting anymore.

08:02.590 --> 08:07.630
But remember, if we set be reached to true, what does the checkpoint do?

08:08.200 --> 08:13.150
Well, it implements load actor implementation, which calls handle glow effects.

08:13.270 --> 08:16.150
So as soon as this actor is loaded in.

08:16.150 --> 08:17.680
If be reached is true.

08:17.710 --> 08:20.980
Well, the glow effects are started off immediately.

08:20.980 --> 08:23.860
We may not want that with map entrances.

08:23.860 --> 08:25.840
In fact, I personally don't.

08:25.840 --> 08:33.850
But all we really need to do is override the load actor implementation and decide what we do with it.

08:34.360 --> 08:35.410
So we have a choice.

08:35.410 --> 08:42.880
We either don't set breech to true, or we override load actor implementation and simply don't do anything

08:42.880 --> 08:44.350
in it if we don't want to.

08:45.270 --> 08:51.120
Since reaching a particular map entrance is something we may want to know.

08:51.420 --> 08:56.580
I'm going to go ahead and leave it and just override load actor implementation.

08:56.610 --> 09:00.150
Let's go and find that it's on the Save Actor interface.

09:00.180 --> 09:05.310
It also overrides should load transform, but the checkpoint sets this to false.

09:05.310 --> 09:06.810
It returns false anyway.

09:06.810 --> 09:08.730
So that's the behavior I want.

09:08.730 --> 09:12.090
I don't need to override it to have that same behavior.

09:12.090 --> 09:13.950
But in the map entrance.

09:14.980 --> 09:20.860
We can go ahead and override load actor implementation to provide the behavior we want.

09:20.890 --> 09:22.210
And I just want to do nothing.

09:22.210 --> 09:26.080
So I'm going to go ahead and generate the definition.

09:28.230 --> 09:29.520
And just put a comment.

09:29.520 --> 09:32.760
So it's clear that we meant for this function to do nothing.

09:32.760 --> 09:38.670
We're going to say do nothing when loading a map entrance.

09:40.320 --> 09:42.390
Now back in on sphere overlap.

09:42.390 --> 09:44.760
Do we want to save the world state?

09:44.760 --> 09:45.840
We do.

09:46.350 --> 09:53.370
However, we're going to keep in mind later that we may wish to save additional information about the

09:53.370 --> 10:01.740
map we're traveling to, because in the HUD, we're showing the map that a given player is in, and

10:01.740 --> 10:08.370
we're going to need to save whatever that map is if we're changing that and loading back into it.

10:08.760 --> 10:11.520
So that's something we have to keep in mind here.

10:12.030 --> 10:15.690
We are going to include or a game mode base.

10:16.850 --> 10:20.900
And we're going to include you gameplay statics as well.

10:21.350 --> 10:23.720
But we might want to put a to do here.

10:25.820 --> 10:31.040
Save the world we are going to or I should say travel.

10:31.460 --> 10:32.570
Traveling to.

10:32.600 --> 10:38.120
Because this almost sounds like a Yoda phrase save the world we are going to, right?

10:38.120 --> 10:39.920
We're not going to save the world.

10:39.920 --> 10:42.380
We're traveling to a world we want to save.

10:43.280 --> 10:49.730
But other than that, when we execute save progress here in a map entrance, I want to execute save

10:49.730 --> 10:57.470
progress passing in our destination player start tag instead of our player start tag and of course save

10:57.470 --> 11:03.980
world state could have an overload that takes in perhaps the name of the new world that we'd like to

11:03.980 --> 11:07.910
travel to and then otherwise does everything the same.

11:07.910 --> 11:10.550
So let's take a look at our game mode base.

11:11.520 --> 11:13.110
We have saved world state.

11:13.110 --> 11:14.580
Let's see what that's doing.

11:15.830 --> 11:20.810
So save World State is going to save all the actors in the world, right?

11:20.810 --> 11:23.690
It also gets our save slot data.

11:23.690 --> 11:31.520
And once we have this save game object, if we did pass in, say, a world string, we could overwrite

11:31.520 --> 11:36.950
a world string that maybe we're saving as the world that we're in right now.

11:36.950 --> 11:44.360
The save game object load screen save game does have the map name, but this is not the actual asset

11:44.360 --> 11:45.020
name.

11:45.020 --> 11:51.800
This is the name of the map that we see in the HUD in the beginning in the load screen, we could have

11:51.800 --> 11:55.190
another one for the map asset name as well.

11:55.190 --> 11:59.450
We could say F string map asset name here.

12:00.170 --> 12:04.760
And if we never set it we can set its value to default map asset name.

12:04.760 --> 12:11.540
So we know that it's unset and save world state could take in an optional F string.

12:11.540 --> 12:18.860
We could pass it in const f string reference, and we can give it a default value of f string the empty

12:18.890 --> 12:19.550
string.

12:19.550 --> 12:23.270
And if it's the empty string, we can do nothing.

12:23.270 --> 12:27.230
We'll call this in World Asset Name.

12:28.020 --> 12:30.990
Actually, let's call this destination.

12:31.570 --> 12:32.560
Map.

12:32.560 --> 12:33.610
Asset name.

12:34.720 --> 12:37.090
So it's an optional input parameter.

12:37.090 --> 12:42.700
Let's add that right here to save World State and we'll check first thing.

12:43.360 --> 12:46.240
If this is an empty string, we'll do this.

12:46.270 --> 12:49.390
Once we have the save game, we'll say right here.

12:50.290 --> 12:54.070
If destination map asset name.

12:54.070 --> 12:56.890
And we'll just say if it's not equal to the empty string.

12:56.890 --> 12:58.270
And let's be explicit here.

12:58.270 --> 13:02.200
Let's put quotes with an empty actual string here.

13:03.330 --> 13:07.920
So we know that its literal value is double quotes with nothing in there.

13:09.310 --> 13:15.550
If it's not the empty string, then we can save that destination map asset name.

13:15.550 --> 13:17.590
This means we're changing to a new world.

13:17.590 --> 13:24.910
We can say save game map asset name equals destination map asset name.

13:25.390 --> 13:32.110
And we can also set that map name, which is the user facing text we see in our HUD.

13:32.110 --> 13:41.440
But what I'd like is an easy to use function that can get the user facing name from our asset name.

13:42.130 --> 13:44.530
So let's make a function that can easily do that.

13:44.560 --> 13:47.530
We're going to put it right next to our maps t array.

13:47.950 --> 13:50.380
We're going to say f string.

13:50.380 --> 13:54.580
We'll call this get map name from map asset name.

13:56.080 --> 14:01.060
And we'll take in a const f string reference called map asset name.

14:04.350 --> 14:07.590
Now this function is going to loop over our maps.

14:08.320 --> 14:09.880
It's going to save for.

14:10.240 --> 14:14.200
And I'm going to use auto ref map.

14:14.980 --> 14:21.100
In maps, and I'm going to check if map dot value.

14:21.100 --> 14:23.500
That's going to be the map itself.

14:23.650 --> 14:28.780
And we're going to use two soft object path dot get asset name.

14:28.780 --> 14:32.290
That's how we get the asset name from a soft object pointer.

14:32.290 --> 14:34.930
And we're going to see if that's equal to map asset name.

14:36.170 --> 14:37.880
If it is, well then.

14:37.880 --> 14:40.850
Now we know which map name to return.

14:40.850 --> 14:46.940
We return map dot key as those keys are the user facing text.

14:46.970 --> 14:50.150
Otherwise we return an empty f string.

14:51.140 --> 14:55.040
So now we have the ability to get that map name from the asset name.

14:55.040 --> 15:03.350
We can go back to save world State, and we can take our save game and set the map name now.

15:04.460 --> 15:12.050
And we can use get map name from map asset name passing in destination map asset name.

15:13.130 --> 15:18.470
Now we get the red squiggles because we're calling a Non-const function here and save world state is

15:18.470 --> 15:19.190
const.

15:19.550 --> 15:26.390
Well, we can make this a function with const get map name from map asset name can get the const qualifier

15:26.390 --> 15:31.910
here, and we can add the const qualifier on the definition as well.

15:31.910 --> 15:33.290
And that'll fix that.

15:33.560 --> 15:41.690
So now that we're saving our world state with a destination map asset name and a map name, now whenever

15:41.690 --> 15:47.000
we save the world with a name passed in, that's not the empty string.

15:47.000 --> 15:48.740
We'll go ahead and save that.

15:48.740 --> 15:51.650
And we can do that in our map entrance here.

15:51.650 --> 15:54.350
So what we can do is call save world state.

15:54.350 --> 15:58.760
And we can pass in the name of our destination map.

15:58.760 --> 16:03.080
That's going to be the name of this map, the T soft object pointer.

16:03.080 --> 16:05.150
So what we can do is pass that one in.

16:05.150 --> 16:12.170
We can say destination map dot two soft object path dot get asset name.

16:12.380 --> 16:20.300
Now the only way this all works is if our game mode has that map in its list of maps, so that we can

16:20.300 --> 16:23.930
load that name up in the HUD when we're in the load screen.

16:24.380 --> 16:28.370
But now that we're saving this world, we don't need the todo anymore.

16:28.790 --> 16:32.330
We're saving the progress with the destination player start tag.

16:32.330 --> 16:37.040
We don't need to handle glow effects, so I'm going to remove that function call.

16:37.040 --> 16:41.000
And with that we now have the skeleton of a map entrance.

16:41.000 --> 16:43.940
We just need to make a blueprint based on it.

16:43.940 --> 16:46.310
So let's hit the debug button.

16:50.410 --> 16:57.640
All right, so just to test out our map entrance, I'm going to want another map, a map to travel to.

16:57.640 --> 17:05.350
So I'm going to go to my maps folder and take my dungeon and duplicate this and make a dungeon two dungeon

17:05.350 --> 17:10.000
underscore two I'm going to open dungeon two I'm going to save all before doing so.

17:10.000 --> 17:14.500
And in dungeon two, I'm going to make some changes here.

17:14.500 --> 17:17.560
I'm thinking I just want to clear things out.

17:17.650 --> 17:20.020
So I'm going to delete some geometry.

17:20.050 --> 17:22.390
I'm going to delete just about everything here.

17:22.720 --> 17:28.870
Actually, I'm going to not delete those beacons because we're going to want to test out our saving

17:28.870 --> 17:35.440
capabilities so everything else can go except for some beacons.

17:35.440 --> 17:38.020
So let's move this beacon over here.

17:40.070 --> 17:41.720
Like so.

17:41.720 --> 17:44.090
And let's move this checkpoint up.

17:45.310 --> 17:47.140
A little bit and to the right.

17:50.140 --> 17:50.980
Okay.

17:52.340 --> 17:59.750
Now, as for player start tags, I'm going to take this player start and change its tag to dungeon two

18:00.140 --> 18:02.090
player start one.

18:03.190 --> 18:04.270
Like so.

18:04.980 --> 18:09.840
And this checkpoint can have its player start tag.

18:13.010 --> 18:15.890
Change to dungeon two.

18:15.920 --> 18:17.330
Checkpoint one.

18:17.900 --> 18:23.510
And then this one way back in the corner can be dungeon to checkpoint two, just so that their name

18:23.510 --> 18:24.380
differently.

18:24.800 --> 18:27.680
And I'm not going to give player start tags to the beacons.

18:27.680 --> 18:29.060
So now we have a dungeon two.

18:29.060 --> 18:30.080
I'm going to save all.

18:30.080 --> 18:37.700
And the first thing I need to do is go to blueprints game or a game mode and go to its maps and add

18:37.700 --> 18:39.200
one of the maps to it.

18:39.200 --> 18:44.810
I'm going to add dungeon two to it and call this second dungeon.

18:47.180 --> 18:51.860
We're going to compile and save, and I'm going to go back to the first dungeon.

18:53.430 --> 18:55.320
And here in the first dungeon.

18:56.410 --> 18:59.890
I can add a dungeon entrance that leads to the second.

19:00.480 --> 19:02.070
So we need a dungeon entrance.

19:02.070 --> 19:03.300
Let's go to blueprints.

19:03.300 --> 19:09.780
I'll put this in the checkpoint folder and make a new blueprint class based on map entrance.

19:12.610 --> 19:16.720
We'll select that and we'll call this BP underscore map entrance.

19:17.950 --> 19:21.580
And just to give it some geometry to work with.

19:21.580 --> 19:24.310
For now, I'm going to take its checkpoint mesh.

19:24.850 --> 19:26.410
I'm going to set the static mesh.

19:26.410 --> 19:30.250
I'm going to search for stare and use SM stares.

19:31.750 --> 19:35.320
Now I do need to see where it is in relation to the capsule.

19:35.320 --> 19:36.250
It's right here.

19:36.250 --> 19:38.950
So I'm going to go to perspective right.

19:39.370 --> 19:42.490
And just move this mesh down.

19:47.990 --> 19:49.880
Looks like that was a little low.

19:49.880 --> 19:51.230
We'll go down to here.

19:52.440 --> 19:53.430
Like so.

19:53.430 --> 19:56.430
And I'm going to make this checkpoint mesh.

19:57.310 --> 19:58.960
A little bit farther out.

20:00.230 --> 20:02.690
From the actual capsule.

20:03.360 --> 20:06.900
And with that I can move my sphere and my move two component.

20:06.900 --> 20:12.420
Now my move two component is going to be where I want my sphere to be actually.

20:12.600 --> 20:15.960
So I'd like to be able to move one of them and have them both move.

20:15.960 --> 20:17.730
So I'm going to close the editor.

20:17.730 --> 20:24.990
And in the map entrance, I'm going to make a constructor where I can attach my sphere to the move two

20:24.990 --> 20:25.620
component.

20:25.620 --> 20:28.950
So really quickly let's make a constructor.

20:28.950 --> 20:32.550
And that means we're going to need an object initializer.

20:32.550 --> 20:38.970
We can copy that const f object initializer from the checkpoint constructor.

20:40.530 --> 20:43.050
And we can generate the constructor here.

20:50.180 --> 20:55.610
And remember, we also need to call super with the object initializer as well.

20:55.610 --> 20:59.750
So we'll do that in the map entrance constructor as well.

20:59.750 --> 21:07.310
And all I want to do in this constructor is take my sphere and call, set up attachment and pass in

21:07.310 --> 21:09.740
my move to component.

21:14.160 --> 21:17.640
Now, of course, this means sphere needs to be accessible.

21:17.640 --> 21:20.760
So in checkpoint we can move that out of the private section.

21:20.760 --> 21:23.880
I'm just going to delete the private section altogether.

21:24.330 --> 21:30.900
Now with that we can compile and launch in our sphere should be attached to our move to component.

21:30.900 --> 21:33.240
And we'll only need to move the move to component.

21:38.320 --> 21:41.710
Okay, so we're back and back in my map entrance.

21:42.770 --> 21:43.970
In the viewport.

21:43.970 --> 21:49.280
I can now move my move two component and the sphere will move with it.

21:49.310 --> 21:52.700
So I'm going to go to Top Perspective View.

21:52.940 --> 21:57.350
I'm going to move this right here to the middle and forward.

21:58.160 --> 22:00.110
I'd like this on the top step.

22:00.320 --> 22:07.340
And I'm going to go to Right View and move it up and then back to perspective to sort of see what it

22:07.340 --> 22:08.150
looks like.

22:08.420 --> 22:09.050
We'll do that.

22:09.050 --> 22:14.450
And then I'm going to take my sphere and increase its radius really nice and big.

22:14.450 --> 22:18.500
So we can reach that radius easily perhaps like this.

22:19.840 --> 22:20.830
About like that.

22:22.170 --> 22:25.080
And we can go ahead and take the mesh and move.

22:25.960 --> 22:29.110
Everything over to the center there.

22:29.110 --> 22:32.830
We'll have to do our move to component as well.

22:32.830 --> 22:33.760
There we go.

22:34.800 --> 22:35.490
Okay.

22:35.490 --> 22:36.960
We'll compile and save that.

22:36.960 --> 22:38.670
And if we bring one in.

22:40.890 --> 22:42.450
Perhaps right here.

22:46.140 --> 22:49.590
And hit the end key on the keyboard to move it down.

22:49.590 --> 22:52.290
We can even move it down a little bit more.

22:54.380 --> 22:57.110
Of course that gives us the bad sys icon here.

22:57.110 --> 22:59.270
So we'll go ahead and.

23:00.310 --> 23:02.890
Just tweak this really slightly.

23:04.700 --> 23:06.950
Just grabbing my mesh here.

23:07.600 --> 23:08.620
And moving it.

23:10.200 --> 23:10.710
Up.

23:11.790 --> 23:14.130
And then we'll take the whole actor.

23:14.400 --> 23:16.500
We'll actually move the whole actor up first.

23:16.500 --> 23:19.470
So it's a good spot and then move that mesh back down.

23:21.660 --> 23:23.250
So something like that.

23:23.250 --> 23:24.510
And then of course.

23:25.640 --> 23:30.170
Readjusting our move to component as well.

23:30.170 --> 23:30.860
Okay.

23:31.100 --> 23:34.310
So with that let's just press P.

23:35.350 --> 23:39.430
And just make sure that we have our nav mesh.

23:39.430 --> 23:41.440
We may have to move things around a bit.

23:41.440 --> 23:46.150
If the nav mesh doesn't go up to the top of the stairs, it looks like in my case it does.

23:46.150 --> 23:53.980
And with that, I can take my map entrance and search for destination and we can set our destination

23:53.980 --> 23:54.400
map.

23:54.400 --> 23:58.240
We'll set it to dungeon two and our destination player start tag.

23:58.240 --> 24:02.020
That's going to be dungeon two.

24:03.010 --> 24:05.620
Player start one.

24:06.810 --> 24:07.890
Like that.

24:08.220 --> 24:11.010
And now we should be set up to travel to that dungeon.

24:11.010 --> 24:13.650
But we never actually travel to that dungeon.

24:13.650 --> 24:14.940
How are we going to do that?

24:14.940 --> 24:18.750
Well, what we can do is in map entrance and on sphere overlap.

24:18.750 --> 24:25.140
After we've gone and saved all the stuff we wanted to save, we can then open that level.

24:25.140 --> 24:26.880
We can travel to that map.

24:27.300 --> 24:33.960
So let's get gameplay statics and call open level by soft object pointer.

24:34.080 --> 24:37.140
We need a world context object that can be this.

24:37.140 --> 24:40.530
And the soft object pointer is destination map.

24:41.070 --> 24:43.830
And with that we'll be traveling to that world.

24:43.830 --> 24:46.140
So again one last compile.

24:46.590 --> 24:50.490
And then we can test out traveling to another level.

24:52.550 --> 24:53.570
Okay.

24:54.980 --> 24:57.320
So let's give this a shot.

24:57.320 --> 25:02.030
First of all, we should go to maps and open the load menu.

25:02.030 --> 25:05.360
So that way we have a valid slot that we're using.

25:05.360 --> 25:11.150
I'm going to go ahead and delete both slots here and create a new game with S as the name.

25:12.100 --> 25:16.090
And right there I can see that the hover functionality works.

25:16.090 --> 25:21.190
And if I want to save the world state, I want to prove that something has been saved.

25:21.190 --> 25:23.950
So I'm going to get this beacon here, I'm going to reach it.

25:23.950 --> 25:25.930
And then I'm going to click on the stairs.

25:26.320 --> 25:28.780
We're going to run up to the top.

25:28.780 --> 25:30.550
And we've traveled to this world.

25:30.940 --> 25:38.380
Now how are we going to know that that beacon on that other map has been saved if we can't get back

25:38.380 --> 25:38.740
to it?

25:38.740 --> 25:41.680
Well, we can put a map entrance here that goes back to it.

25:41.680 --> 25:42.790
That's cool.

25:42.790 --> 25:49.180
If we press stop and press play again, notice that our map level says Second dungeon because we saved

25:49.180 --> 25:49.570
that.

25:49.570 --> 25:50.590
So that looks great.

25:50.590 --> 25:55.090
And if we select the slot and press play we go to that level that we saved at.

25:55.090 --> 25:57.490
We also saved that player start as well.

25:57.490 --> 26:02.770
If we reach a beacon here or not, a beacon, but a checkpoint and leave and come back.

26:03.830 --> 26:05.630
We should start at that checkpoint.

26:05.630 --> 26:07.580
And if we save a beacon here.

26:09.040 --> 26:12.700
Well, we have to actually reach a checkpoint to save that progress.

26:12.700 --> 26:13.990
But when we do.

26:15.720 --> 26:20.820
We come in at that checkpoint and that beacon is already reached.

26:22.610 --> 26:28.730
Okay, so to get back from one level to the other, we need a map entrance so we can go into dungeon

26:28.730 --> 26:32.960
two and we can place a map entrance here.

26:33.640 --> 26:39.280
So we'll go to our checkpoint folder, bring it in a map entrance, hit end to bring it down.

26:39.280 --> 26:40.750
But we need to configure this.

26:40.750 --> 26:41.950
Where do we want to go.

26:41.950 --> 26:42.220
Right.

26:42.220 --> 26:47.290
So let's search for destination and we'll put in our first dungeon.

26:47.290 --> 26:49.510
And for the player start tag.

26:49.510 --> 26:51.280
Why don't we just come in at.

26:51.880 --> 26:54.730
Dungeon one, checkpoint one.

26:54.730 --> 27:01.810
So using these consistent naming conventions for the player start tags makes it quite easy to just know

27:01.810 --> 27:04.180
if you want to spawn in at that first checkpoint.

27:04.420 --> 27:05.530
There you go.

27:05.860 --> 27:07.750
Okay, so let's save all.

27:08.170 --> 27:09.490
Let's press play.

27:09.520 --> 27:11.050
Actually, let's not press play.

27:11.050 --> 27:14.770
Let's load in an actual game from the load menu.

27:16.600 --> 27:19.030
And now we should see a dungeon entrance.

27:19.030 --> 27:21.040
Now the cool thing is if I just click on it.

27:29.250 --> 27:33.570
Then we come back in and I went to this checkpoint here.

27:33.570 --> 27:34.140
Right?

27:40.160 --> 27:42.470
Was that the one I designated?

27:42.500 --> 27:43.280
I don't remember now.

27:43.280 --> 27:44.060
Let me see.

27:44.090 --> 27:46.130
I'm going to go to dungeon two.

27:46.130 --> 27:47.690
Dungeon one, checkpoint one?

27:47.690 --> 27:49.040
Yeah, that's the one.

27:49.310 --> 27:52.340
That is the first checkpoint.

27:53.150 --> 27:56.540
If I wanted to start at the player start one, I'd have to use this tag.

27:56.540 --> 27:58.130
This one doesn't have a tag.

27:58.130 --> 27:59.540
We might as well give it one though.

27:59.540 --> 28:04.910
We can say dungeon one player start one.

28:05.540 --> 28:12.530
And that way, if we wanted to start at that one, we could we can go to dungeon two and take this map

28:12.530 --> 28:16.850
entrance, set its destination player, start tag to dungeon one.

28:16.850 --> 28:20.840
Player start player start one.

28:23.360 --> 28:23.960
All right.

28:23.960 --> 28:25.190
We'll go back to the load menu.

28:25.190 --> 28:27.020
Test these things out really quick.

28:28.210 --> 28:30.100
So we're saved there.

28:32.880 --> 28:35.430
We can go to the second dungeon.

28:36.910 --> 28:39.040
Now we've reached both checkpoints here.

28:39.040 --> 28:43.360
We haven't reached this other beacon that's way over here.

28:43.360 --> 28:46.780
Now, this isn't a fade actor, so it's not going to fade out of the way.

28:47.550 --> 28:49.260
Let's reach that beacon.

28:49.260 --> 28:52.320
So everything in this second dungeon has been reached.

28:52.350 --> 28:57.000
Now we can go into the dungeon entrance, which takes us back here.

28:57.000 --> 28:59.130
And why don't we just reach everything here?

28:59.130 --> 29:01.050
Let's go ahead and reach this one.

29:01.050 --> 29:03.570
So we've saved our progress at that point.

29:03.690 --> 29:05.490
Let's see if I can even make it.

29:05.490 --> 29:08.160
I think I can make it to this beacon.

29:10.020 --> 29:14.340
And I don't know if I can make it to I can I can make it to this checkpoint.

29:14.340 --> 29:14.730
All right.

29:14.730 --> 29:16.920
We've reached everything in all levels.

29:16.920 --> 29:20.670
And now the only way to save is to transition to other levels.

29:20.670 --> 29:23.070
But now we see that everything.

29:23.070 --> 29:24.510
There's that glowing beacon over there.

29:24.510 --> 29:26.250
Everything has been reached.

29:27.040 --> 29:30.580
In this one and everything in this level has been reached.

29:30.580 --> 29:38.950
I loaded in at this beacon actually, so I might have a typo in the destination player start tag here.

29:39.160 --> 29:44.830
No, I don't have it set, so I might have changed its player start tag instead of its destination.

29:44.830 --> 29:45.430
That's fine.

29:45.430 --> 29:52.210
Let's set this to dungeon one player, start one, save that.

29:54.300 --> 29:57.150
So now that should bring us back.

29:57.960 --> 30:01.920
To that first player start in dungeon one.

30:01.920 --> 30:03.750
So let's test that theory.

30:07.170 --> 30:11.340
Okay going straight back to the other level and we're at player start one.

30:11.730 --> 30:12.090
Okay.

30:12.090 --> 30:17.070
So we have a transitioning system a system to transition from one level to the next.

30:17.070 --> 30:23.280
As long as we have those levels in our map on the game mode, we'll see them in the load screen as well.

30:23.280 --> 30:29.970
So this gives us the opportunity to create multiple levels strung together.

30:29.970 --> 30:34.350
You can even have a dungeon entrance on some completely different map.

30:34.350 --> 30:39.240
That's like an outdoor map, and you can make some stairs that go down.

30:39.240 --> 30:44.550
In fact, that's what we're going to make is a staircase that goes down because a staircase up to nothing

30:44.550 --> 30:45.690
doesn't make sense.

30:45.690 --> 30:48.570
I would like a staircase going down into the ground.

30:48.570 --> 30:55.050
So we're going to be working on making that in the next couple of videos and really making something

30:55.050 --> 30:56.250
that looks really nice.

30:56.250 --> 31:01.800
But we have the makings of a really nice level transition system that looks great.

31:01.800 --> 31:05.250
So really making something we can be proud of here.

31:05.250 --> 31:05.880
Excellent.

31:05.880 --> 31:07.080
Excellent job.

31:07.080 --> 31:08.730
I'll see you in the next video.
