All language subtitles for 08. Creating the First Sword Ability

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
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
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
fa Persian
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

It's time to work on our first ability now as you probably already know a key feature

These survivors

Game

Is that your ability

Autotech

You do not actually control any of your abilities at least

In vampire Survivor

I'm sure there are other games

That's slightly tweet dead formula

The working and go with Dad's style where you're

Abilities are going to order it

And you upgrade them over time

Until the 1st of February that were going to implement is going to be a

Quote on quote melee attack

That happens on a

Specific

So I don't go over to your

Tilemap

And let's take a look at it and see what we could use as this a bill

It's going to be a melee attack

I'm thinking that we can take

This sword right here

And have it pop into existence / at something and then disappear and then have that go on

Interval

And then of course we'll have upgrades that will out

Subtitled by online-courses.club We compress knowledge for you!

How to increase the Frequency in a damage of that but let's go ahead and do that

No I don't think that you should

Stray from the abilities that I'll be designing

I think

It will be best if you use the same Sprite that I do

Just because I think you're going to be using a few of these and

It may be

Confusing

When we start getting into new abilities if you've strayed a little bit from what I've done

I'm going to find the sword

And it looks like it's tile 0104

Remind me to do as I'm actually just going to copy this file

And then I'm going to

Go into my file system right-click and say open in file manager

This is a nice easy way that you can open up your

Project folder

In your native

File Explorer

And I'm just going to go ahead and

Put that tile 0104

In the root directory

So there it is

Straight forward going to right click to rename this

And we're going to call it

Sword

I was going to head and create a new scenes organ hit control n

Let's create a root node of 2D scenes if you click this button

It'll make it

No 2D by default

We're going to call this sword ability

And we're going to save this

Go to Simms

And where can I do something a little bit different here I'm going to create a new folder called ability

And then we're going to create a new folder inside a vehicle

Sorted

And then we're going to close

So what you should have is you should have scenes ability

Sword ability

And then sword ability

And what does go ahead and put all of our abilities in there

Ok so

The weather working approach this is were going to make each ability

Phone scene

I'm going to spawn it into the game when it's

Respond will create a

Set of code

Responsible for managing

Where my ability should be used in creative

And upgraded and

What's go ahead in a new child node with ctrl a

Let's find a Sprite 2D

And what you can do that's really nice when you have the filesystem tab up as you can actually

Use this filter files to search

Profile so

I'm going to

Search for sword

That's a nice quick way of finding the sword

I'm going to go and drag that into the store ability swords

Organise

With the scene

I'm gonna take that texture and drag it over to the straight to the

And there's our sword

This orange cross

In the middle that you can see

So I'm just going

Given that that warrant cross right there

That represent

The pivot offset that is the position around which

Will rotate and any

So when you're doing animations and looking to rotate something that will be important thing to know

Why am I bringing it up because we're going to make a slashing motion for the sword

It looks kind of awkward when the

Tivat offset is in the sea

So what we're going to do instead

Is we are going to change the offset down here

And we're gonna move it up in the Y Direction again

By holding control

Clicking and holding and moving the mouth

Left

I'm going to put the rotation point

When around the hilt right

If I rotate it

It's a much more natural motion because that

That's what you would expect

The point to be that a sore throat

Original leave this as is

Because now I'm going to work on

The note that actually going to be responsible for spawning this ability

The game

So let's go to our player scene if you

Control shift

And then

That brings

The quick opensea

We're going to search for our player seen in and

Another player

What do we

Well we need a way

2

Manage when a bill

Is Haber

This is more of a design

Decision and if you're not

Familiar

With

Designing software designing scalable system

Essentially the key to designing any system

Needs to be extended

Is abstract

Now that's a very

General

State

The idea is

If you can have strapped

If you can make things general or generic

Do you have an easier time

More content to that

So what we're going to be sitting up now is going to be in the spear

Of abstract

We're going to be

Creed

A handful of nose

They are all designed to make the process

Making and managing abilities

Easier

So the first thing I'm going to do is I'm going to add a new note

The player and I'm just going to make

Type of note here

Remove it up to

Top again I like to put

The regular nose before the now

2DS

Organisational purposes

We're going to call this dab

Manager

We made her listen to an actual scene at some point but this note is most

Just away for us

To organise our by

Ok and then work we're going to do is we are

How to create a new

Scene control n

Click on other node we're going to make it a type of

Note

And then what we're going to do

What is Renee called Ace

Sword

Control

So you may already see where this is going now

So I got into save this

And within are seen last seen

Mobility Direct

Let's create a new folder and run a call it's sword ability

Controller

Now this level of granularity maybe

Little bit redundant or maybe a little bit unnecessary

But I figured that we should stick with the pattern that we have going on so we'll create a separate folder

And then inside of that

Folder

We will

Save the

It's so now we have our sword

Controller

What's go ahead at a scripted

And all the default setting should be ok so let's go

Create

And now we're going to do is this

No it is going to be responsible for spawning the sword

In an automated fashion

So at the sword

The first thing that we need to do is we need to tell the sword ability

Controller

What the sword ability is

Write in Godot if you want it instantiated as seen at runtime so we've been staying cheating scene

Within other scenes

Like the player

In the main or the basic enemy in the main but we can actually do that

Run

Which

Obviously we're going to want to do in many cases

So what we're going to do first if you're going to specify the scene that corresponds to the sword ability

So that we know which seen we need to spawn

The game at

So what we going to do is work going to export a variable which

Configurable in the editor

In the way that you do

Easy-do at

Sword

Ability

At

And what is Paxton does that contacts

Is that tells us the type of the variable that's being exposed

In the in

So once you've done this and save to the Script your notice over hearing your inspect

Denmead

Underneath sword ability controller

Now you've got

An item a proper

You're called Sword of Bill

With my

If I click this

I can either create a new

Seen or I can download apex

So you see how that's the only resource that can go on here I can't input a number I can input a string

I can use other

It's too late I can say

Play float

And now it becomes a number field

Right

I can do string

So that it become

What's 8 x 4

We're going to do is work going

Dupe axes

Because we want to

The Sword of

And you can go and your inspector here and

Click and drag the sort ability over into that flat

So now we have a rest

To the park

That corresponds to the sort of

Ok so now we have that we need a sword to spawn on a certain inter

I'm going to do something very big

At first so we're going to go ahead and

Add a child node

Underneath the sword build a controller

Daddy time

And then

We're going to check

One shot

Also going to check Auto

You can configure the time however you want I think I'm going to

21.5

And maybe it's a good idea to do the same as me just

Alright

So now we're going to get into a concept called signal

If you're familiar with other programming

Signals in guedel are basically

The Observer pattern

So for those that are unaware

Subtitled by online-courses.club We compress knowledge for you!

The Observer pattern is basically

An event-driven sis

Where you have an event that happened

Inside your coat

And that event is

To a variable number of

So basically in the Observer pattern

You don't know

Who or what is all listening to the event

You basically just passed out the event

To everything at the list

And that's a really nice way of writing software because then an indefinite number of things can listen

For very specific event

To be list

So in a van

Might be

When the timer runs

I don't want to have to explicitly check the timer every frame

To see if it's finished

I just want to be told

When it's

So that I can

Run my code

And this is what signals.in good LR

Signals are essentially events

That

On the

That you can emit

To signified an event has

Or that you can listen to

From any other node or any other girl

If that doesn't sound superclear right now don't worry we're going to get into it and you'll see how it

Right now

So in a ready method this is where we typically what

2

Connect Sid

The weather this works is that we need to get a reference to the timer know so that we can

Connect to a signal

On the time

Is a couple of days ago

You can

Get underscore now

And then you can supply a note

A notepad

Starstruck

There are

Relative or absolute Power

What's 2/8 note in

If I do get

Timer as was

For me

It's going to look for a child

Call timer

If I

Add another

Level

Today

And out of the timer underneath that

I would have to do

Node

Right to say that

So it's basically

Level deep you go

You have to specify that in your

Pass

That's one way to do it

Shorthand way to do it is to use a dollar sign

And

Timer

So the dollar sign timer is shorthand for get no

Timer and we don't have to use any

Strings or the get node function

The way to connect to the signal is to

Time out this is the name of the signal and if you don't know what the name of the signal is that you're trying to

Like to

You can so

The timer

In Your Scene

Dark hair

Go over 2 note

And then you can see all the signals that belong to the notary

That's one option

Or

You can

F1 on your keyboard

Search for the object or the no that you

Connect to

And it will list the signal

Here

So you can see very clearly on time-out

That will be

Omitted

When the timer

0

So

Timer dart time out and then we stayed at

Connect

And then we need to pass a function

Rapha

So let's go out and create a new function down here

The process

On

Time

Time out

And hear what we're going to do is just going to pray

Deuce

This is where we're going to want to actually activate the above

That's going to delete this process method because we don't need it

Will just be running unnecessarily

In our timer timer connector

Der pass that on time

Time out

Internet

Make sure not to call it like this

Because that won't

We need to pass it as a

So this is essential

Pointing to

That's

So we've got the

Auto start and one shot enabled hair and 1.5 sec

So we can quickly verify that this work

By clicking this button up at the top

Call drum

Currents

Or S6

If we click this

And let it sit for a while and have sex

Can we go back to editor and go to the output tab at the bar

You can see the disappointing do some

So if you're seeing this

Then

Your code

Is working

Ok so that's why

Let's just go ahead and disable one shot

Because

We actually do want this

Keep running

And so if you disable the one shot in and around again

What you'll see is that

Timeout signal keeps getting a murdered everyone

Seconds

What we want because every time on timer timeout is called

By the signal emission

We are going to want to spawn our sword

So let's go back to a player

And we're going to click on the ability manager in my going to instantiate a child scene

By doing control

Or command shift I will be using win

Keyboard shortcuts but I believe it's the same on Mac

And we're going to

Instantiate the Sword of billet

Controller

So that it is a child

The

Manage

Let's go and Run the game

And you should see the output window that is being printed now when we run the four

That's because our sort ability controller is now in the overall tree

Because it is a child

Of

The player

Ok let's just do something really basic

We're going to instantiate this sort of

Add the player position

Set of printing this do some

What we're going to do instead

Is we're going to say

Incidence

Is equal to

Sore

Ability

And since we know that

The Sword of Bill

Is basetype Notre Dame

Weekend

As known to die at the end of that instantiation

Cast

And now this is the tricky thing with instantiation

So what we've done is a we've created a node but it's in memory

We have to tell it manually to be inserted into the scene tree

Add a specific

So where we want to put a sword in

Well I think for now we probably just want to put it in

The main

So how are we going to do

Well here's something that

So let's grab the play

Bar player

Is equal to

Get tree

Get

First node in group

Claire

And I'm going to do as no a 2D like we usually

And let's go ahead and move this line down the sword instance

So

If you hold on

And then press down on arrow keys you can actually move Lines

Up and down in the

Move this line down

And the reason is because we don't want to understand this unless we know that it's safe that we have a player

So if player is equal to now

What we're going to do as we're just going to

Return

Now

This should never happen

Because

Our player

Where this ability controller is attached

To write however

I generally like to

Write my code as module as possible and make as few a song

That generally ends up

Creating better Co

So we shouldn't make the assumption

The player

Is going to exist

Despite the fact that

As the game current least

The players should always

When this code is being run

So the players go to normal just return

Otherwise we can instantiate the sword instance

Am I going to say

Player

Start get pairing

So that's going to get the parent of the player

Which in this case is going to be this main mode right here

Because you've got the pleasure here

Get pair

Is up one level two mean

Player get paid

Adch

And this is the way that you add new note

To the scene

I'm going to go ahead and add my sword

And I was one of the things that we need to do

By default when you add a note to D to the scene

It's going to have a position of zero zero

So it's going to be at the world Orange

Or the origin of the new Duty that you're adding

What we need to do is we need to take that sword instance

I'm going to set the global position

Eagle

Two player

Start global

Now this is not the final behaviour that we're going to do but just doing this to get our code to start

And so all went well we can run the game

And you can see that as you walk around swords are being spawn

And so that's a good start for our sword ability in the next lesson we're going to continue working out

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