2/6


HAR-CORE PARKOUR

Start your day with a warm-up


You are in the last few months of high school and then you off to exciting new things. 


Looking back on the last two years, what advice would you give to an incoming CART Student? What did you really like? What was not so great? Is there anything you personally would have done differently?  



What are you learning?

Practice

Why is it important?

It is important for you to get comfortable with the interface.

How do you show that you understand? What is the assignment?

You are to create a super awesome Hard-Core Parkour Course


Click Games then select Third Person and click create

Select shapes and drag them into your game

Build your ultimate Hard-Core Parkour Course

Now we will add a check point

Open your content drawer

Open Hour_of_Code>Blueprints

Find BP_checkpoint

Drag it into your world

Once a player has respawned, it will be facing the direction of the arrow

Select the checkpoint and rotate it so that the player is facing the entrance

Right Click and select play from here

Walk over the checkpoint and make sure it turns blue then walk off the edge to see the checkpoint functioning correctly

Walk in the entract and take the moving platform to the other side

Let's go ahead and change the start location to Current Camera Location (we did this yesterday)

Open your content drawer >All>Content>Hour_of_Code>Static_Meshes

Grab SM and bring it into your game

Add floating islands until you can reach the floating island with the rock



If you look at the Outliner, you will notice we are getting lots of objects with similar names so let's rename them

Select the first rock and find it in the outliner

Double Click or press F2 to rename it

I am naming mine SM_Platform_01, SM_Platform_02, SM_Platform_03 but you can call them whatever, just make sure they are 1,2,3


We will be playing with loops

A loop is something that happens continuously

In the outliner, hold shift and select all three of the platforms

With the three Now we are going to add a sequence

Open your content drawer and select sequences

Click Add>Cinematic>Level Sequence

A sequence will be created in your sequences folder. I am naming mine SM_Moving_Platforms

Double click the sequence you just created to open the sequence editor

Right click in the spot marked X and select Actor To Sequences >Add Current Selection (3 actors)

We have three actors because we have the three platforms selected

 All three of the platforms in the sequencer and we are ready to animate

Add a checkpoint from your Blueprints at the exit before you jump to the first platform and rotate it

We are going to be adding a key frame just like we did with blender

Select the first Platform

The sequencer is running at 30 frames per second

We want the platform to be still for half a second so we will move the scrubber to frame 15

Click the circle between the two arrows to add a key frame so that the platform will remain at this position untilthe 15th frame

Turn on Auto Keying 

Move the scrubber from frame 15 to frame 45 add a key

Use your scrubber to test it by moving from 45 to 15 frame then back

Scrub to 75 and add another key

Scrub over to 105

Right Click Copy the key frame from frame 15 

In frame 105, right click

Paste > MovieScene3DTransformTrack_0.Location 

This will place the platform at the lame location as Frame 15

Scrub to test

Grab the red line and pull it to 120 to end it

SAVE YOUR WORK!

Open up your sequences folder in the content drawer

Drag it into your game

Now make this sequence a loop so that is plays continuously with the platform going back and forth over and over

Go to details > Playback

Check the autoplay box

Set to Loop Indefinitely

Test and save

Select Platform 2

Scrub over to frame 45 

add a key frame to platform 2

Scrub over to 75 and add a key frame for platform 2

Move your platform

Copy your key frame from 75 and paste it into frame 15 

Go to blueprints

Add another checkpoint

Save All

 Let's look under the hood of the checkpoint blueprint

In your blueprints folder, double click the checkpoint and your blueprint editor will open

We will primarily be working in the event graph and the viewport

 Go to the viewport

individually explore all the physical parts of the checkpoint and the details for each

Go ahead and close your sequencer

Pull out your event graph and place it below your viewport so you can see both

So On Component Begin Overlap (Sphere_coll) just means that something is touching the sphere collision

Once it does, it moves on to the next node

So what is happening here is that once the player overlaps/collides with the collison, this is checking to see if the checkpoint has already been activated. So the condition is that the checkpoint is enabled. If it is has or it is true, that is the end and if it is false it moves on to SET 


As it passes through SET, the checkpoint is enabled so the condition is now true so that next time it collides with the collision, it is true and nothing happens.


Something that is True or False/On or Off is called a Boolean

As the program passes though, it changes the yellow cylinder blue

The target is the checkpoint

The parameter is that it will be a color

The value is the actual color

So what is happening here is that the blueprint is sending information to the game (casting)

Get Game Mode is the information

Spawn Location is where to put in the player

We get that info from GetWorldTransform which is where we are in the world (location, rotation and scale)

Checkpoint Transform is the location (coordinates where we are setting the player (when they are spawned)


 it plays a sound

Debug

If you make the checkpoint larger and die, you will respawn larger as well.

It is the world transform that is causing this bug

Move your Checkpoint Transform and Get World Transform

Delete the Orange Return Value Connection by holding Alt + Click

Right Click on Return Value and select Split Struct Pin

 have split up the information going to the spawn location into separate values

Grab the location value and connect to Spawn Location

Once you do this, it will add a converter

We have modified the code so we need to click compile

Now when you play the game, the character will spawn the same size

Drag the Value Rotation Node and add is to the Spawn location

You will see that it makes a mess and we have an unused converter

Delete the converter

Once you have deleted the converter

Connect the Return Value Location to the Location in Make Transform

Your character will now spawn in the rotation you set in the checkpoint

Compile, test save

Save your work!

https://youtu.be/tv266uQvyWE