All language subtitles for 008 Setting Up Animations with PaperZD[UdemyIran.Com]

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

In this video, we're going to implement the actual animations and animation switching through Paper

XRD.

Of course, we can also switch between animations without the free Paper XRD plugin, and we will actually

do that for some elements later on.

But for something that is as complicated as a character, it saves us so much time and makes it so much

more maintainable.

So let's get started.

In the content drawer, we want to go into the blueprints characters player folder, and in here we

can right click and go to Paper XRD.

And you can see that we have three different asset types.

Here we have animation sequences animation source and a paper XRD Anim Blueprint.

The first thing you always have to create is an animation source.

So let's do this and call it as underscore player and open it up.

An animation source basically is a collection of all the flipbooks that we want to use with this character.

And so far, we can't really see much here because we first have to add a couple of the Flipbooks.

Just click on Add New here new animation sequence.

And the first one we want is idle.

So just type in idle and we can then on the right side for animation data select the player idle.

Like this and we can zoom out here.

And yeah, it is basically just playing the animation here.

You can see our you can see our timeline at the bottom here.

We're going to use this later to add notifies add sound effects and things like that.

But for now we just want to register all of the animations that we want to be available for this character.

And the easiest way to do that is to just have this window open, but also open the content drawer.

You can also do that again with control and space.

And here we want to go to content paper assets characters and player.

And here we can just like see all of our frames.

And sadly there still is no automatic way of doing this.

But I actually talked to the developer that this is a requested feature, and maybe he'll add it in

the future because this process takes a couple of minutes just looking at all of the flipbooks and registering

them here.

So just having a shortcut would be very nice.

But for now we still have to do this manually.

So let's go through them one by one.

So clamp is the next one.

We can just add new new animation sequence.

Call it clamp.

In case you cannot rename it right away, you can just right click go to rename.

If you mistyped and change the name like that and again for cleanup.

Double click it.

And on the right side here we just go for player climb.

Just like this and go to the next one.

The clamp.

Shoot.

So add new climb.

Shoot.

Like this.

And here.

Climb, shoot.

Uh, actually, it's, uh, climb, underscore shoot here.

Right, player.

Climb, shoot.

Select this one and the next one is player fall.

So go here.

Fall.

And look for a player fall.

And as you can see, this is a little bit of an annoying process, but this is the only way we can do

so.

Uh, fall shoot is the next one.

Ball.

Shoot.

Here.

Look for fall.

Shoot.

The next one is hurt.

So go here.

Hurt.

On the right.

Also select the hurt for the player.

The next one idle we already put in.

So this is fine.

Idle shoot is the next one.

So a new sequence.

Idle shoot.

And here also I'll shoot.

The next one is jump.

Uh, the next one is a jump rise.

So new animation.

Jump, rise.

Here also.

Jump.

Rise.

Like this.

The next is jump, rise, shoot.

So here at the jump.

Rice shoot.

Here as well.

Jump, rise, shoot and only a couple more to go.

Please stay strong.

We have the run, so add a new one.

Run.

Also here.

Player.

Run!

The next is the player.

Run, shoot!

So, uh.

Run, shoot.

Here we look also for run!

Shoot.

And we have two three more to go.

So slide is the next one.

Slight.

So now yeah it didn't get selected.

So right click rename slide.

And here, look for a slide.

Next up is the wall slide.

So again a new one wall slide.

And here we also want a poor wall slide.

And lastly, we have the wall slide shoot.

A wall slide shoot like this.

And here also wall slide shoot.

And this is it.

Now we registered all of these here.

It took a couple of minutes.

This is a little bit of an annoying step in the process.

But it is necessary because unless we register the animations here they're not going to show up in our

animation blueprint.

And we cannot use them with Paper XRD.

Okay, so now that we have finished this, we can just drag it over here, make sure to save all.

So in case something crashes, you don't have to do this again.

The next step is creating the animation blueprint.

So now we want to go back to the blueprints characters player.

And you can also see the animation sequences folder.

So when we added these animation sequences here it actually created a an asset for each of these in

here in this folder.

And yeah so this is just how paper Z manages these.

So yeah we have used the animation source.

We have been using the animation sequences.

And the last piece of the puzzle is the animation.

Paper Z and MBP.

So just click it.

And here we first have to select the parent animation source.

And this is the as player where we just set up all of the different animation sequences so that the

animation blueprint can access these.

And I want to call it ABP for animation blueprint underscore player.

And let's open it up.

And if you've worked with animation blueprints for 3D games and skeletal meshes before, this is actually

quite similar.

This basically consists of the event graph where we have the tick event.

We have the Oninit event, which we can use to set up certain references and variables.

And here on the left side, when we double click, we also have the animation graph.

And this lets us set up our animation trees and and decides which animation should be played at which

time.

But first what we want to do is on event graph on init.

This is executed one time when this animation blueprint is initialized.

Here we want to set up a reference to the owner which will be our player.

Because the animation blueprint will need to know what the player and access the variables on top of

the player.

The way we can do this is to get owning actor and this is a special function by paper.

ZD and here we can just cast to be player.

Right?

Because we of course want to access things that are on the player's parent, right?

The action character base on the actor.

But later on, we also want to access is shooting, for example, to know if we should hold up the gun

or not.

And this is only going to be available on the player.

So this is why we need to cast to the player and not just cast to the action char base.

And yeah, so just on init we want to do this one time and then we want to save the reference.

So here we can drag off and just promote the variable and just call it owning player.

Just like this.

And this allows us to access this owning player over here in the animation graph.

So we can look for the velocity, we can look if we're jumping or not, and do all of these things and

decide based on that which animation we want to play.

So just to demonstrate how this works, let's first just drag off here.

The output animation node will determine the final state of our animation.

We can just drag off here and type in Play Run for example.

So if you type in play you can see all of the different, uh, you can see all of the different flipbooks

that we registered in the animation source.

Right.

So let's just play run for now for demonstration purposes.

And I'm going to compile and save.

There's no errors.

But if I start the game now while the character is not running, because again, we have to tell the

player blueprint to actually use this animation blueprint.

But this is actually very easy.

So on the player.

We want to look at the left and the components.

There is the animation component.

And this is by Paper XRD.

When we have the selected on the right side we have the anim instance class.

And we just have to click here and it shows up the ABP player, the animation blueprint which we just

created.

And this basically just tells this sprite to use this animation blueprint and creates a connection like

that.

Now when I go back to the map and press on play, you can see that the character is running right.

It doesn't matter what I do, the character is always running.

And why is that happening?

Because I just always play run for the output animation.

So just a very simple test.

But this proves to us that this animation blueprint is working and the player is actually using it.

But in the next step, we have to put in some conditions to decide should we run, should we play jumping

or falling?

And this is actually also quite easy.

The simple way to do this is to just drag off here again, and we can select animation by bool like

this.

And we can for example just grab the owning player, get the owning player and we can get velocity all

the way at the bottom get velocity.

And we don't really care about the direction.

We just want to know are we moving or not?

And the simple way to do this is to just get vector length.

And this will just show us.

Are we moving or are we standing still?

And here we just have to check for greater than zero.

So if this is greater than zero, it means we are moving in some direction.

So if we connect this here right.

So true means if this is greater than zero we are moving.

So we want to play the run animation.

If this is smaller than zero or just zero we then want to play the idle animation right.

So we can play idle.

Like this.

And we just created a simple branching logic.

And based on this condition, it's going to decide, should we play the run animation?

Should we play the idle animation?

Let's try this out.

Right.

So I'm just standing still.

I don't have any velocity.

I'm just standing.

But I start moving and hey, we start walking around, you can see the animation and it is actually

that simple.

But as you keep on adding more and more functionality, it actually gets quite messy if you just use

these selects, right?

Because for example, we can if we are running well, if we are moving, we could also be jumping or

falling, right?

So then we would have to use another select anim by bool.

And then we would have to decide are we airborne or not.

And then if we're not airborne okay we can play run.

But if we're airborne then again we have to select anim by bool and then decide are we falling or are

we going upward.

And you can see that this becomes quite messy.

And there's actually a better way of going about this.

So we can just delete all of this.

And right click and create a state machine.

Right add new state machine.

And I like to call this locomotion for the basic movement and just connect it here.

And you can have multiple state machines.

You can then use the select by bool between different state machines.

So you could have a state machine for swimming for example, one for flying and so on.

And then connect them here.

But we just have a simple character.

So in here we now have a kind of different type of graph.

And this is just the starting point.

And our starting point should always be the idle animation.

Right.

So we can drag off here and animation state and we want to rename this.

So just right click and rename or just hit F2.

And I'm going to call this idle.

But this alone doesn't do anything.

We have to double click it.

And in here we again have this output for the animation.

And here we just want to play idle.

Just like this, right?

And then we can go back here.

Right?

Go back to locomotion.

And I'm also going to use the mouse buttons.

So if you have thumb buttons on your mouse you can use them to go back and forward here, which is very

useful.

But yeah just go back to locomotion.

Right.

So we start here, we go into idle and that's it.

But now we also want to put in again the transition to run.

Like this.

And if we can run well, we just want to play run.

Very simple.

And we need to put in the condition.

So this condition is going to decide are we allowed to go from idle to run, or are we just going to

be stuck in idle.

So here we again want to do the same thing we did before.

This looks a little bit different and we just have a result that is either true or false.

But again we get the owning player, get velocity all the way at the bottom.

Then we can get vector length actually just a vector length.

Just type that in.

And again, we just want to decide bigger than zero.

And this is our condition.

So if this is true we are allowed to go from idle to run.

So let's just try this out I go here, I'm an idle.

It's all good.

I add velocity by walking.

I'm walking.

But now I just keep on walking.

We actually also need to add a condition for going back from run to idle, so we can just drag off here.

And the easiest way is to just go here.

We can just copy all of this control C go back here and paste control V and just add the not boolean

here.

And just connect it here.

So this is the exact opposite of the case we have here.

I can compile save go in here.

And yeah I can walk I can stand still.

And we basically just do the same thing we did before with the select.

But this is much more maintainable and expandable.

And this is the stage where you sometimes notice that the setting might be wrong.

And I think for the idle animation, it looks a little bit too busy and too fast.

So we can just quickly slow this down in the content drawer, go to Paper Assets Character Player,

and we have the idle here, the player idle.

And I actually want to change this to five from seven to slow it down a little bit, make it a little

bit more relaxed.

And yeah, you can see that this works out now it's a little bit slower.

And these are the kind of things you just adjust while you make the game.

Next up is the jumping and falling animation, and we can easily add this again in our ABP player.

From the idol.

We just want to drag upward animation state and rename it to Jump Rise.

This is the animation that's going to play while we're jumping and ascending.

So just open it up.

And here just play.

Jump rise like this.

And we then just want to set up the condition here.

So from the owning player we can get owning player and we can just get is falling like this from the

character movement.

And is falling is actually named a little bit confusing because is falling actually just means is airborne.

So this also is true if we are jumping upwards, which we want to do here.

So we can just connect it here.

And this is enough to go from idle to jump rice so I can go here.

I just jump while being idle and you can see we play the animation.

But again, now we're stuck in the animation forever.

And we want to.

Actually go from the jump race animation into the falling animation first.

So here we have another animation state.

Just rename it to fall.

And here we just want to play fall.

Just like this.

And the condition here is a little bit different.

Here, we simply want to check for the get owning player and we want to get the velocity.

All the way at the bottom again.

And this time we actually care about the direction.

So we can split right click split struct pin.

We only care about the z because z is going up and down.

And well, we want to know if the z is smaller or equal then zero right.

So if this is smaller, equal and zero this means we are done ascending and we're going to start descending,

which is exactly when we want to go from our jump rise to the fall.

So let's check this out.

Yeah, we go up and once we hit the apex, we go down.

But now again, we want to finish this and go from fall back to idle.

And for this condition, we can just go here from the idle to jump rice.

Copy all of this.

The is falling.

Ctrl c go in here Ctrl V and here we just again just use the not boolean to exactly flip it around.

So this means if we are not falling anymore well we can go from the jump rice to the fall then from

the fall back to the idle.

So like this.

Yeah.

So we have this loop set up.

But there is one issue that is if we jump while we are walking, we are actually not playing the animation

because we did not set up a transition from running into jump rice only from idle.

So let's do that now.

Let's create some space to make it easier to see and connect here.

And here we just have the same condition from idle to jump rice.

Just copy this ctrl c.

And now it can be a little bit confusing which one is which.

But if you just hover you can see a run to jump rice which is the one we want.

Just go here and put it in here and connect it.

Yeah.

So if we start falling or are airborne, we can also go from jump.

We can also go from run to jump rise.

So let's go here.

I am running and I jump.

Yes, we go to jump rice.

We go to falling.

This is fine.

While idle, it's fine.

So this is how we set up all of the different animations and the shooting and the sliding.

Everything else we're going to take care of later.

But this is the basic setup you're probably going to use again and again for all of your games.

But the thing that bothers me a lot right now is that the character is not fun to control at all.

It is super floaty.

We don't have any control over the movement.

It's just kind of keeps drifting in certain directions.

And this is because the default settings on the character movement component are really bad.

And in the next lesson, we're going to take care of that.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.