All language subtitles for 003 Charge Material Flashing[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
fa Persian Download
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

Now that the charge is working, and we cleaned up our blueprints a little bit, we want to implement

the charge material flashing, which is going to make the entire thing much, much better.

We already prepared the dynamic material from the flashing, right.

So in the BP player, if I look for dynamic I can see the dynamic sprite material variable here.

Right.

We use this for the flashing when we take damage.

But we can reuse the same functionality for the charge flashing as well.

And just give it a different color and maybe different timing.

And there are multiple ways we could go about this with like timers and handles and all of those things.

But I think if we look at the IA shoot event.

The best way of doing this would be to just use the ongoing event and to show how this works, we can

just print string here.

And if I go to the game now and I just hold shoot, you can see that we always print a message while

shoot is being held.

And since this is being triggered on every frame, the button is held down.

We can kind of create our own timer in here and then decide when we want to flash the sprite.

Now delete the print string and first we want to create a new function.

So on the left side just click on functions.

And call it handle charge flash.

And what do we need here?

Well, we need the elapsed time to come in.

So here we can just select this and create a new input of type float.

And just call it elapsed.

And why do we need this?

Because we want to have more control over the flashing.

Now back on the event graph under the shoot.

Event IA shoot, we can now just use this handle charge flash function here.

And we connect it from ongoing.

Very important that it's ongoing and also connect the elapsed seconds.

And now we have access to this information inside of this function before we reach the partial charge

threshold.

We don't want to flash at all.

After that we want to flash white.

And after we reach the full charge, we want to flash blue or some different color to make it clear

to the player that they have charged as far as they can.

So first we want to check again if the elapsed is bigger.

So we can just drag off here and check for greater equal then and for shooting.

We have our, uh, partial charge time.

Right.

So we check for the partial charge time like this and have a branch as well here.

So we don't want anything to flash until we reach the partial charge.

And again, if compiling saving, we can just shortcut this elapsed here to.

I don't like having the lines here.

If we don't need them, just get elapsed.

Shortcut this.

Like this?

Yes.

So if this is not the case, we don't want to do anything.

If this is the case, we actually want to start a timer.

And this timer is just going to keep on counting up and up and up.

And we're always going to check if it goes over a certain threshold.

And every time it reaches that threshold we're going to play one flash and reset the timer.

So here we can just create a new variable and call it flash timer or better charge flash timer.

Charge.

Flash.

Timer.

And set this to a float.

And just drag it in here and set charge flash.

Timer.

And what do we want to do?

Well, we want to get the current charge flash timer and add the delta seconds.

So add and get the world.

Delta seconds and delta seconds are related to tick.

We're not going to go into these specifics too much, but basically this gives us the time that has

elapsed since the last frame.

So this basically is just a counter.

So if one second has elapsed it's going to give us one second.

And well of course not from one frame, but it's going to keep on counting up.

It's basically just going to create a stopwatch in here.

So then only if true is the case, we go here and we count up the stopwatch.

And if this is not the case, we actually want to reset the stopwatch, right.

So here for false we just want to set the timer to false.

So if we haven't reached the threshold yet we just want to reset this entire stopwatch.

And what do we want to do then.

Right.

So we count first.

And then we want to check if the charge flash timer is bigger or equal than our flash interval.

And this is something we have to create.

Now create a new variable, not a local one, and call it charge flash interval.

And compile save so we can set the default value.

And now we want to set it to 0.2 which I think is a good timing for the interval.

And now if this is true we just want to branch off here and connect.

And then only continue if true is the case.

And here we can then play the flash.

And we created a function before for this on the action chart base, which we can just use in here.

So we can just look for flash.

And here we have the trigger flash.

And here I think for the flash multiplier we can just use something like five to make it clearly visible.

And the flash color for the basic flashing I just want to go to white so we can just drag up here,

have it be all white and click on okay.

But this alone is still not enough because we still need to reset our charge flash timer just to show

you how this works.

Now I can just go from here through print string and we can just print the charge flash timer.

And because it's not being reset, it's just going to flash all the time now.

So I can just go here and hold shooting.

And you can see the charge timer doesn't reset.

It is always above our interval.

So we just keep on flashing.

And this is a very easy step.

We can just get rid of the print string.

And before we play the trigger flash we can just set charge flash timer.

Uh, set charge flash timer and just set it back to zero.

So the stopwatch again starts from zero and has to count up again to our interval, which is 0.2.

And this means we are flashing once every 0.2 seconds, which was our goal.

And let's check it out.

I can go here I can hold shoot.

And yeah, now we are flashing every 0.2 seconds because we are properly handling our timer.

And I think this is just a really nice effect.

It makes our game much more readable.

It lets us know if we are still charging and if everything is working, and now we just want to implement

the different color for once we reach the full charge.

So back in the BP player we could here add a branch and then again decide based on the timing if we

should play this trigger flash or this trigger flash.

But again, I think a better shortcut here is to just use a select.

The flash multiplier is always going to be the same, but I want to change the color.

So from the color I can just drag off and look for select and use the utilities select.

And now for the condition what do we want to check.

So we want to know if we have charged for longer than the full charge time.

So I just want to get elapsed.

Which we are passing in here, right?

The elapsed.

And I want to make sure that it is bigger or equal than our full charge time.

And we can have this under shooting and we have the full charge time.

Just drag this in here and then use the boolean that returns as the index.

And now again.

So we just can select the color now.

So if our elapsed is bigger than charging we know that we have the full charge.

So this is the true case.

And here like I said I want to make it blue.

Uh like this.

Have it be a dark blue and click okay.

And false is again the normal charge case.

And here, like we had before, I just want to have a white color and click on okay.

And now if I compile save, go back to the map.

I'm going to hold shooting.

You can see it flashes white.

And now we're over the threshold.

You can see that it flashes blue.

It is a subtle effect.

You can only really tell if you pay close attention, but it still makes it a lot more readable and

advanced players can take advantage of this.

There is one more edge case left though, and this is that if I hold the button and I get hit.

The actual charge shot does a reset.

So if I let go, I'm not shooting.

But the charging animation, the flashing does not reset, right?

So so we need to reset this charge flashing if we get hit.

And again an easy way is to just go to the beep player.

And in here in our handle charge flash function we don't just have this condition with elapsed is bigger

than partial charge time.

But we can also go into where is it was hit during charge right in the shooting in our variables.

Get this and have a not boolean.

And here we just want to combine these two cases right.

So if and boolean.

So only if this and this is true then are we allowed to proceed and look into the charge flashing.

Right.

So we can go here create some space.

And compile and save.

And let's check this out.

Now I charge, I charge, I get hit and you can see the charge flashing stops I let go.

I'm not shooting the bullet.

So this is a nice edge case that we covered here.

Our character has come quite a long way now, but I also want to add wall sliding and wall jumping.

But to be able to do that, we need to build a small playground where we can test out these mechanics.

So we're actually going to look into gray boxing and how to use the cube grid in the next video.

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