okay so we are back and in the previous
video we talked about class blueprints
versus level blueprints and the
advantages and disadvantages to using
either of those based on your blueprint
needs we also talked about how to create
class blueprints so right-clicking the
content browser choosing the blueprint
class option or from the add new or the
blueprints option as well as selecting
several actors inside of your level and
converting them to a blueprint which
we'll do later in this video series as
well we also talked about four right
click and go to blueprint class the pick
parent class so deciding the parent
class for our newly created blueprint
class so that we can inherit inherit
some functionality from our parent when
working with our new blueprint and we
created our light under squared BP
blueprint based off of the actor class
which is something that can be placed
inside of our level or spawned and then
we also actually we did a lot in the
previous video we also walked through
the class blueprint interface and the
differences between the level blueprint
so with all of that out of the way let's
start focusing on this video let's start
creating our class blueprint and the
components that we will need that will
comprise our class blueprint so let's go
ahead and double click and open our Lite
VP blueprint here should be inside the
blueprints folder if it is not you can
select the content browser and then
search for it and the excuse me select
the content folder then search for it in
the search bar here just write
underscore VP is what we named it and it
should pop right up for us go ahead and
uh bollec and open it up now if you did
not close this blueprint at all from the
last video in the transition to this one
and you are still on the viewport tab of
this particular blueprint don't worry if
you did close the blueprint and you are
opening it up and you were seeing the
same screen here you are on the class
defaults tab and you're wondering how do
I get back to the viewport tab of the
blueprint editor
don't worry you can do that by clicking
this open in a full blueprint editor but
I kind of wanted to show this really
quickly because if you do not have any
components or script associated with
your blueprint you're going to default
to the class defaults tab and the class
defaults we're not going to go to in
depth in this here but the class
defaults allow you to define as the name
suggests defaults default values for
specific properties for this particular
class such as networking information
rendering how it handles input etc all
of that is defined inside of the class
defaults so to get back to the main
blueprint editor interface here we're
going to click the open in full
blueprint editor and that's going to
transition us to the event graph of our
blueprint we can hop back to the
viewport tab here and this should look
similar to how it looked when we first
created this blueprint so the first
thing that we're going to need to do is
add some components to this blueprint so
that we have several objects that make
up this blueprint essentially and as we
talked about in the previous video it's
not gonna be done from the components
window again there's a couple different
ways that you can add components you can
click the add component button here or
if you go down to the content browser
let me see if I can minimize this here
so that we get both on screen if you go
down to the content browser and you go
into the starter content folder and
let's go to let me clear my filter here
if we go to the let's go to the props
folder inside the props folder we are
going to use this lamp SM underscore
lamp wall fixture here we can also left
click and drag items into the components
window here you can see if you mouse
over this section it says drop asset
here to add a component so let's go and
do that let's take our SM underscore
lamp wall left click and drag and drop
that into the components window up here
and it's gonna add a component to this
blueprint so now we have our SM lamp
underscore wall static mesh as a
component of our newly created class
blueprint now it's gonna ask us for a
name whenever we
component let's just go ahead and give
it a name I guess SM underscore lap wall
is fine but we're just gonna call it
lamp fixture like so and the next thing
we're gonna do let's actually make this
the root component and by route this is
the thing that everything else is going
to be attached to right now we're using
a default scenery which is a dummy
object that is created automatically by
default we can replace this with our
static mesh so I'm going to left click
and drag our lamp fixture here and drop
it on top of our default scene root so
go ahead and do that and our lamp
fixture now becomes the root of this
blueprint which is what we want so let's
continue now let's do a couple more
things here we're going to add some more
components so let's go to the components
button here now and let's click the add
component button so we have our fixture
and we click the add component we want
to add a light source to this now so it
illuminates light from this fixture so
we could use a point light which we've
done in the previous examples with our
level blueprint but we're going to add a
different type of light for this so
let's go into the search component
option and let's search for spotlight so
when you search for spotlight an option
will come up go ahead and choose the
spotlight you can see it says it emits a
directional cone shaped light which is
perfect for our little fixture here so
I'm going to choose spotlight and that
now adds a spotlight component to our
blueprint so we have a static mesh
component and we have a spotlight
component now before we do anything else
I kind of want to compile and save this
so that we saved our newly created
blueprint I'm going to drag this
blueprint off-screen for a second you
can minimize it or actually let's dock
it let's talk it to the top up here so
I'm gonna dock it to the top up here and
I'm gonna go back to our level level
here for a second let's go down to that
blueprints folder where we created our
blueprint and inside of it you can see
we now have our fixture that we added as
a component our light source isn't
necessarily emitting from this thumbnail
but it is there but now we have
of our class blueprint here that we can
add to our level so let's go ahead and
do that let's left-click and drag our
newly created class blueprint into our
level like so and I'm going to add mine
to the side over here on the dark side
of the wall so that we have a little bit
of shadowing where we can have our light
come on I'm going to place it over here
place it up somewhere along the wall
something like this and we can use the
translation tool we can again hit W to
get to that and position it somewhere on
the wall I'm gonna do it something like
something like this it should be good
something like that towards the backside
of the wall and the shadow there and our
light is currently indicated by this
cone shape that is currently pointing
out in this direction below our light
source here we actually want to have it
coming up along the wall here and this
is where blueprints can get a little bit
confusing depending on your background
or where you're coming from the this
particular workflow workflow I should
say you may be inclined to want to
modify the position of this light
directly inside of the level editor
viewport here but what we are going to
do instead is modify that inside of our
class blueprint so I'm gonna drag this
down to kind of make a little bit of
space here so that we can kind of see
both so there we go there's our level we
back out just a little bit there's our
level and here's our class blueprint
here and we are still on the viewport
tab navigating the viewport tab of the
class blueprint is identical to moving
around in the viewport and the level
editor so we can hold down the right
mouse button and kind of move around
inside of it we can hold WASD to kind of
fly around we can use the mouse wheel to
zoom in and zoom out or excuse me not
zoom in and zoom out but control the
mouse movement inside the viewports if
you want to slow it down just mouse
wheel down if you want to increase your
movement speed roll it up so what we're
gonna do let's take our spotlight here
make sure that it is selected you can
select it from the components window as
well go ahead and hit E on your keyboard
I don't enter rotation mode
and we're going to do is just rotate it
90 degrees along the y-axis here so this
green arc so that it is pointing upward
so let's go and do that I'm gonna left
click and drag and rotate that up 90
degrees like so and you can see it also
updates inside of our level editor as
well so there's one more change that we
need to do this we need to actually bump
it up so that it is not emitting from
below our light fixture here so I'm
gonna hit W to go back to translation
mode and I'm gonna grab the red arrow
here and move it up along the X oops
make sure I grab the red arrow and just
move it up along the X here a little bit
now I'm moving it at a much finer speed
than you may be moving it what I noticed
just now is actually in between videos
as I was playing around with this I
changed my grid snapping values and
that's something that you can do inside
of the level editor as well up in the
top up here click this drop down here I
think it was set to ten by default go
ahead and bump that down to one that'll
give you much finer control as you
position this spotlight inside of our
little light fixture here so I'm a fly
around to our level inside the level
here so we can kind of see what it looks
like in our level and inside of our
blueprint here just gonna position it so
that the light is kind of coming out
like so something like this well not
like that but like this and there's
gonna move it let's move it down
somewhere around there doesn't have to
be perfect but so long as a light source
is emitting out of the fixture here if
you want the exact values you could set
those inside the details panel as well
for our spotlight so we are currently
sitting at six point six point zero by
zero by fifteen point nine just for the
sake of it I'm gonna make that sixteen
so six for the X zero for the y and
sixteen for the Z like so and we're
gonna make a couple more modifications
to our light as it's super bright right
now and we also want to adjust this cone
radius here which is indicated by this
blue cone shape so we're going to change
both of those
really quickly before we finish up and
the first thing we're gonna do is bump
down this intensity a little bit it's
kind of high at 5,000 I'm gonna drop
this all the way down at 2,000 like so
to make that a little bit less bright
then we're gonna change the light color
so I'm gonna click on this light color
option this bar right here it's gonna
give me a light picker so I can kind of
just drag around you could see it's
updating my level as well as I drag
around in here I'll feel free to choose
any color you'd like for our purposes
I'm going to choose a kind of golden ish
color I guess something like that like
so I'm gonna click OK to apply that
color and then the last thing I'm gonna
do is adjust the cone the outer cone
angle now there's an inner cone angle
and an outer cone angle we're only gonna
focus on the outer cone angle here it's
currently set to 44 it's gonna drag this
slider over to the right a little bit
and stretch out that cone angle just a
little bit you could see that our light
and the level now it's kind of expanding
we want to get it somewhere around I'd
say somewhere around let's see let's try
60 it's my enter in 60 actually
somewhere on there feel free to play
with these values until you get
something you are happy with I think
that's good enough for now cuz I want to
get back to scripting stuff so we've
added our spotlight we've added a static
mesh and I kind of want to point this
out as well what we are looking at
inside of the level editor here is not
just a spotlight or a lamp not lamp
fixture but a static mesh we are looking
at a blueprint class that's what we have
created and placed inside of our level
so this is a singular actor inside of
our level it is not multiple actors that
are placed in our level it is a singular
actor with multiple components and those
components are our static mesh for our
light fixture and our spotlight and
additional components which we're going
to add now before we wrap up this video
here so we have the visual aspect of our
light here we want to add some
interactivity to this similar to what we
did with our
level blueprint example we're gonna add
a volume that when the player enters can
turn on and off this light so let's go
ahead and do that so let's add another
component inside of our light blueprint
here so I click the add component button
and inside the search box
previously we added a box trigger so if
I search for box trigger nothing comes
up but if I search for a box see there's
an option for box collision now this box
collision component is the same thing as
using that box trigger before so go
ahead and choose the box collision and
it's going to add a box component for us
inside our viewport here as well as
inside of the level viewport so I back
out and kind of see it and as you can
see our box component is currently
sitting inside of our wall and it's cut
and currently up in the air what we
probably want to do is stretch it and
kind of alter it so that it's flush with
the floor and extends a little bit out
away from the rope with the wall so it's
going to do that and we're going to do
that again inside of the viewport of the
blueprint class that we've created I'm
gonna take our translation widget and
grab the x-axis and drag it over to the
right just a little bit so then it comes
off the wall and is somewhat flush with
our light fixture it doesn't have to be
perfectly flush but just so that it
doesn't protrude on to the other side of
our wall here and you could turn on and
off the light from inside this room here
which is what we probably don't want I
think that's good it looks close enough
but we also need to stretch it down to
the floor as well so to do that we're
gonna go into our scale mode so inside
of our viewport here I'm going to hit R
to enter scale mode and gonna take the z
axis and let's see just stretch it up a
little bit and that's going to stretch
it gonna go and press W now to go back
to translation and then I'm just gonna
slide it down a little bit so that it
reaches the floor and we can see inside
of our level here it's kind of
penetrating the floor it's just fine it
can be flesh sticking to the floor is
just fine shouldn't bother us too much
so now if we fly inside of our level
here here's our volume that we won't
need to enter
could make this a little bit wider if we
wanted or make it stick out a little bit
further but I think this is good for now
that I think we can continue to move
forward so we're about 15 minutes in
we're gonna add one more component
before you wrap this video up in the
next video we'll do our functionalities
so let's add that final component before
we wrap this video we want to add a
little bit of user friendliness to this
so when we the player enters this
they're not going to know to turn on
this light them they're not going to
know that they have to press a button
because that's what we want to do for
this particular volume before when we
entered this one it would automatically
turn on and off for this one we want to
turn it set it up so that when the
player enters this volume they can then
press a button to turn this light on and
on so that's what we're going to do for
this particular volume but we need to
let the player know that they need to
press a button so a quick and easy way
to do this is by adding a component so
go ahead and click add component and
let's search for text search for text
and it's gonna give us a text renderer
component and this renders text in the
world with the specified given font so
let's go ahead and choose a text
renderer component it's gonna add
another component for us and as you can
see it's added some text inside of our
level here and it's also added it as a
component inside of our viewport here
it's currently sticking inside of the
wall and it currently says text so we
can hop over to the details panel to
change the properties of our text
component that we just added I'm gonna
scroll down a little bit under the
horizontal alignment under the text
section here for horizontal alignment
click this drop down let's change this
to center that will Center up our text
and then let's actually change the text
from text to something a little bit more
descriptive we're gonna call we're gonna
enter in let's say press F to toggle so
when the player presses F that will be
what we use to toggle on and off this
light so we hit enter and our text is
super big right now inside of our level
so let's actually scale that down a
little bit we can do that from the world
size option here under the text section
it's currently set
2:26 let's set this to 18 maybe a little
bit more let's set it to 12 might be a
little too small I think that's good
enough we'll set it to 12 we do also
need to adjust the position of this text
it's currently sitting up pretty high
and inside the wall so we're gonna do
let's go inside of our viewport here
let's drag it down just a little bit and
let's slide it out away from the wall
something like so so now if we look at
it inside of our level when the player
comes in and enters this volume they'll
get this text that appears that says
press F to toggle and the last thing
that we need to do before you wrap this
video up is scroll all the way down to
that visible option for rendering we're
actually gonna uncheck this so that it
is not showing because we only want this
to appear when the player enters our
volume and we're gonna set that portion
of script up through blueprint script on
our event graph actually in the next
video so make sure it's set to hidden or
excuse me miserable is unchecked so that
it is hidden in game so let's compile
and save and let's actually pause here
before we continue
so far we've added all the components
that we need to our blueprint class and
we've gone through the workflow of
adding components and manipulating
components inside of the blueprint
editor and then placed our newly created
blueprint our asset into our level to
get a singular actor that has all of
these components and everything we need
for our blueprint to work inside of our
level here so that's gonna do it for
this video we're gonna pause here and
we'll pick it back up in the next video
where we start working inside the event
graph and creating the blueprint script
for the functionality of this particular
light here so thank you guys for
watching and we'll see you in the next
video