All language subtitles for 33. Creating an Axe 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
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
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

Let's Create another ability

For the player so that we have a little bit more gameplay for riot

So just as a refresher let's go ahead and open up our sword ability

Control

By hitting ctrl shift on a keyboard and searching for it

And our ability controller consists of

A timer

A root note

We're pretty much going to model our new ability

After this

In the same way

We can open up the

I just take a look at what's going on here

We're going to do

Very similar things to what's going on in there

Sword ability controller

However one interesting challenge that we're going to have to do

Is figure out how to allow the player to choose the ability

As a reward

For levelling up

But that will be

Tangled in a little lesson which is focus on actually making

Ability

First solar

Click on the scene window

Mahir and then hit control and on the keyboard

How to create a new scene

Let's select other node in

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

Route type of no

The top here

And let's call this

X

Ability

Controller

Read and say that

2 Singh's

Ability

We have the sword ability in sword ability controller with screen new folder

Ask

Controller

So is created at folder in the ability directory and then we can just say

Write in there

Loudest

Script area is getting a little bit closer hear some going to right click anywhere in

A script here

I'm just going to say clothes

I will clean it up nicely

I'm going to go in at a

Script to the sack

Lee controller

You should be ok so

Create

Now before we write anything in r script

Let's add a timer

So we're going to add a child no timer

And pick a time that you think is reasonable for the accessibility I'm going to 2 seconds

I know I haven't describe what the accident is going to be yet but let's just get this

So I did 2 seconds and then I'll start

Ok

So before you go any further what I want to do with the accessibility is I'm going to go to the tile maps of the ca

Any tiny dungeon

I'm going to open up the tire on my part

And I want to take this

X right here this this

And what I want to do with this as I want

To spawn at the

Disposition and then spiral outward gradually in a radius

Damaging every enemy

Hits

I think it's going to be really fun ability to make and it shouldn't be too complicated

I'm actually going to go look for this acts image now

So I'm going to go

2

The tiles directory

Of that asset pack

And I'm just going to scroll Intel i5

Dial 011

I'm just going to drive it over into the editor

Into the file system dark and then should place it

And then I'm going to go open up my seems ability

Let's create a new folder under the

The ability directory in C

So in a create

A

New folder

And I'm going to call this x underscore ability

Emery name this tile

2

Axe

And then I'm going to distract that acts over into the accessibility directory

How many create another scene by hidden control

The keyboard that's making a root type of 2D scene

Let's call this axe ability

Let's save it let's go up a couple of directories until we find that accessibility folder

Created

Click into

And saved

In there

Is it control a 2 add a new note search for types bright 2

Add

And then drag over that

Text png onto the

Your property

Let's like a 2D button at the top so we can go back or to leave

This is what I actually looks like and I think the default settings here are pretty much

Fine

They are

And will do more of this accessibility later

All I want to do is I want to make the accessibility controller spawn the axe so let's go to our x

Body control seen open up that's cool

Let's do export in you probably know where we're going we're going to export that scene so I can say

RX ability

Scene

Of time

Packed scene

Before we go any further let's just go out and drag that accessibility seen over in here so go to your file system

The accessibility and Dragon all over

Of course you can use the load

Dialogue here in selected manually from the file system

If you prefer

So let's override the ready method here let's grab a reference to the timer with dollar sign

And then we're going to say

Time out

Connect

On timer timer

And again I'm going to get a little bit faster with the scripting now because we've

Done a lot of the stuff already

So Funk on timer

Time out

And let's

Create an instance of that accessibility

So we're going to save our

Instance is equal to accessibility scene.in stands

And we can say as no 2D because

The type that is

And what we wanted

Well we want to grab a reference to the play

So let's go and do that bar Playa is equal to get underscore 3

Get first node in group in quotes player

Asthma

And then let's do a check if player is he

Let's

Return out of that

Perfect

Let's grab a reference to the foreground so we're going to save our foreground

Is it going to get

Tree get first

Group

As known to

Remember our foreground is in our main seen here

It's this note to die

And it has the group for Grant lair so we actually need to

Update the string

Sonar accessibility controller screw

This needs to be

Foreground underscore letter here

That's going to give us

Basically where out

Abilities will exist as chilled

Can we can

Also add a safety check here if we want to solve will say if for ground

No

Send

Return out of that as well

Ok so then we got her x instance

Let's save foreground add child

X

Instance

And then we're going to say

Instant

Global position is equal to

Claire glow up

Ok let's hit ctrl shift o

And then open up our

Players

In our building manager let's instantiate a child scene and put the accessibility controller

Right next to

The sword ability controller so again right click ability manager

Instantiate child scene

And access

Comptroller in there

If we did everything right when we play the game

We should see

Daddy

Periodically spawns at the player position there

Now I need my tax actually work

Lorax ability scene

We can go back to the TV mode Justice

Just to see what's going on here

And let's go data script and the diff

Location is good

So whatever you want to do in the accessibility well the first thing that we were

Do is we probably want

2

Animator

And again I wanted to Spiral out away from the player

I think the easiest way to do that is going to be using a

Between

Override the ready method

I'm going to do is really creative tweens of our tween is equal to create

Now Queens are in you can't

For us

A tween is essentially a way of programmatically defining animations we can animate pretty much any

Property in the same way

We can in animation player

But Queens are a little bit more flexible in some case

Animation player

Because we can pass in variable

Property

So if you're a car with an animation player we

Define specific keyframes

Alarm

The animation

And

With a tween

If we have some variable

Like we want to move

Or anime something

Between two positions

Does positions vary then we can easily accomplish

So this case what we gonna do

Is we are going to

Between

The position

Of the acts over time

Spiral

So it's going to be a little bit

Tricky but I'm going to do the best that I

Describe what

What I want to do is I want to call tween dot

Screen

And essentially what this has to do is this allows us to call and message

Where we can write our own behave

This is not typically how you do

Between button Arcade

This is what we

So the method it takes a cold

So we'll see

Tween underscore method which Wills

Soon

What do we want to win it from well

H from value at R2 value is going to rappers

What's a revolution

So let's say that we want

To do

To Revel

So we're going to have it going

Twice

I'm going to say 0 for the fur

Valley

And 2 for the second

And duration can be

Whatever you think is reasonable I think I'm going to use too

Since

The delay

Always have an axe

Let's define that method

Tween

And there's going to be an argument that comes into a method and that is going to be

Whatever the current value is

Between the from and to

So this twin is going to basically interpret

Between 0 and 2

Over 2

And then in our method we can

We can get that value so we're going to say

Rotations

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

In this

Float

So that's right passing

So I want these to rotate around the player but I also want the radio

To grow as it rotates around

And so let's

Create a constant of here

Call Max radius

Just said it to 102

Ok so back in the Twin method

Well I'm going to say I'm going to save our current radius

Is equal to

Rotation

/ 2

What put that in parentheses by highlighting it

And here

They opened Francis

And then again and multiply that by our Max

So we're doing here for essentially saying

Well 2 is our Max about

And so this is going to be

Percentage and pull that into another

Variable 3% is equal to

Rotations / 2

And then we can

Replace that

With person

So that's going to be how far along in the radius we are

And then our current angle

Is going to be

Applied

To a Vet

So Let's save our current Direction

Is it

2 letters use the constant vector to write

Are we going to rotate

And what are we going to rotate it by

We're going to rotated by

Rotations

X

Tau

So does this make sense so

From 01 will be less than 360 degrees remember Towers to pie and this isn't radius

As we exceed one it would just wrap around

What in an asthma approach to that will be to Revell

We could use a

You know we can rotate this by our current rotation which is going to be in there between 0 and 2

X x

What are proper rotation

So now we need to set the global position on the app

And what we're going to do as we're going to save our

What's happened to the players of our player is equal to get 3

Snowden

Claire and

Let's Create another variable above the player called via root position

How much is initialise it to Vectra 2.0

Underneath player with site if player

Is equal to null

Then we're just going to set root position is equal to our own global position of the app

Otherwise if the player is not null we're going to say root position

Is it good to

Claire

Dot global position

Ok

And then what we can do is we'll set the final global position of the axis also global position

Is equal to root position

Plus and this is going to look for Millie

I'm going to take that current Direction

Shannon x

Buy the current radio

Everything works what essential we should see is a rotation of the axe so let's go around the game

See what happens

So the acts is not rotating as we expect and you can see that is actually being really

Digikey

I think the reason for that is

Between things that worth winning between

Integers

So it's only passing integer values into this rotations

Twin method

And the way that we can sort that was we can just tell a girl that this is actually a

World

By doing .0

Source

0.0 2.0 that would tell us that this is a float

And let's see it

Ok so like that

We're going to ask that gradually increases

In radius and swings around

Galleries going little bit fat

So I'm going to probably turn this down

3 seconds instead and see how that look

Perfect ok so let's go over this logic again just to be really clear

So we're defining a mackerel yes that's as far

The axe can be away from the

That were sitting at between were telling between that we want to go between a value of 0 and 2

Over 3 seconds

And while your tween

Call this

This twin method

With whatever interpolated

This value represents our rotation

Define between

The functions were taking in the number of rotations that have happened

And it could be a fractional number

We're just going to get the percentage value in order to calculate

What our radius should be so this will be anywhere between 0 and 100

As were multiplying in here

And then our Direction we're gonna take the number of rotations that we are

Multiply that

A towel

And use that as a rotation

Applied to

The right vector

And again the right vector is at 0 degrees or 0

Direction of the unit vector

We got a trade

And all the rest of this is essentially just figuring out how to position the app

So we're getting a root position in the root position is either going to be the player if it is

So on this line

Or we're just going to use the current global position of the

As

Not occur to me that this is actually probably going to break

It's a pleasure is

So I think we probably actually be better off removing this line and then just writing

Return in store

And then we can remove the else and on it

So make sure on intent that's very important otherwise

It will not be afraid

Ok so

Exist would just stop moving the X that's a simple Morrissey

But if it does exist within a set a route position to the player global position

And we can actually further simplify this so I'm going to actually just remove the root position out right

Delete this line

And then replace this route

Play Adele

What position

Actually saying the axe is going to be rotating around the player global position

And then we're going to offer

From that position

By the current Direction we calculate the time

So when we do saw we end

Something like

Now we're still had done but this is the behaviour that we've got going on

Ennis looking

So what's

So twins are really useful because we can actually tell it to queue up a function call

After

It finishes tweening a previous them so I can

In my ready made that I can

Between

Tween callback

And then I can write in here queue

Now again

Do not invoke this by doing

This that

You need to just passing a reference to let me

I just using the name without involving a

What is it going to do is this is go

Two twin

Between 0 and 2/3 seconds and then when the tween is done it will free

The apps for us

Get me to run again just to make sure that's going to work

And your actions should be disappearing

Alright xx

So we have some more work to do to get this

To actually work

So if I open up my sword ability we can see that we've got a couple of things in here

That we're going to need for the axe one of the things is the hitbox component so that he boxed

Is very important to be able to damage enemies

So let's go over back door

Let's instantiate a child scene

Hitbox component

I want ad with control a

A collision shape

2D underneath app

Let's create a new circle shape

And actually the default

Shape here

I'm in the shape of you

Is actually fine I think that's great so

That's all good

And then we've got our collision layer

Witcher 2 enemy

That's good

And I believe that

That should basically be anything everything that we do

Now we do need to assign a dam

To the app

Ability

And so they were doing that in our sword ability if I open this app

Is where

Resetting a damage in the sword ability control

And then were passing at damage down

Online for tea here

To that

Box can't

Which vein carries blood

Switch to Vienna

So let's do the same thing in our accessibility controller let's Create

A vast damage at the top

We can send it to something

Like 10

And what we're going to do is we are going to before we go any further

Dark tour accessibility

Open up that script

And we need to get a reference to the hitbox components let's say on ready

Hitbox underscore

Component

Is equal to

Hip hop

Ok so that should be all we need let's go back to the accessibility controller gdpr

In The Script

Waste here

When we create is acts instance

Let's go ahead and add new line

ASUS instant start hitbox

Compound

Damn

Is equal to

Damage

Now we did that rain the action by destroying Anna

Let's go ahead and see

Thorax is doing damage to enemies

Atlas spruce up the accessibility just a little bit

We're going to add a generation player so let's go out and add child node to the accessibility

Animation player let's move it to the first child

Create a new image by clicking this button here

And a clicking new

And create this as the default animation

And I'm going to change the duration with the

Marks over here

2.5

And I'm going to

Click on my Sprite 2D

Scroll down to

Rotation here and I'm going to collect the key icon

To add a new track and then click create

Zoom in using the slider in the bottom right just a little

And what I'm going to say is I'm gonna put a keyframe at the end

Add .5 seconds by right click

Clicking insert key

Number to change this value to 300

Ok then the final thing I'm going to do is

Click this button to the far right over here that says animation looping

Guardian quick

And if you use this button here play the selected animation

You can see that we've got in endlessly roti

Axe

So we can see how that looks in game the final thing you should do is turn on this toggle right here which is AutoPlay on load

So we don't have to manually tell the animation and start playing

It would just started

Is the let's go and Run the game

Perfect song we got a little bit more life in our axis

There's more we can do but we'll see

More of that stuff for the polishing that we do it later on in the core

The final thing that I do want to do that

Before

We

Do anything else is just as last little thing

I want to randomise the starting rotation for the X so you'll notice that

When the axes are flying they always rotate twice in they always end when they

To the right of the

And that's a little bit

Uniform

It's kind of boring

So I'm just going to randomise the base rotation that were using for the app

Initial

In the way that I'm going to do that as I'm going to declare a variable up here

Barbados underscore rotation

Was that two Factor to that right

Ok and then the ready method I'm going to above the tween

Set base rotation is

Go to Vector to.rye

Rotated

Then we're going to say randev

Range

0

To tell

Ok

And then instead of

Using backer to that right here in the Twin method

Well I'm going to do is replace that with the base

So what we should end up with now is that our access are all

Sort of spawning and if you

And ending in different place

Ok so that's looking great

That's good for RX

Ability the next step is to make it appear as an upgrade option

When the player levels up

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