All language subtitles for 11. FSM Patrol (GOOD)

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
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
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

Welcome to the patrol.

Functionally.

This consists of two parts the finite state machine for patrolling and the actual code to make it work.

First, let's understand what patrolling does exactly when this state gets triggered.

It will try to make the tank patrol for this.

First, it will try to acquire a new waypoint system.

If a free one was found, it will be used.

If not, it'll move to a randomly generated position nearby, with sometimes generating a faraway position

to make it more dynamic.

This is the first level of the state machine.

We need to go down one level more inside the patrol by double clicking it.

Note that the patrol is called when the state machine is started as this is the default state.

Also, this state will be used if there is no target and the agent is not currently retreating.

The patrol is one of the simplest state machines.

It's made of two states.

Get the position and go to that position.

If it has a target, it will exit the states and continue into the attack state.

Let's check the code now and see how this works in the initialize.

Besides the regular parameters, we will use the tank mover and connect to its finished moving signal.

This will be useful to know exactly when to generate a new patrol point on entry is called when a new

sub state is entered.

And here we need to reset the turrets position.

This is the first thing because it might be rotated from the attack funny state machine and if you are

in the get position state, then we first need to stop the tank mover and then find a new patrol strategy.

The find patrol strategy function is divided into two parts checking for a waypoint and then generating

the actual path.

We need to check if DCI doesn't currently have one waypoint because if it does, then we just get the

next note and that's it.

But if it doesn't have a waypoint, then we need to query the waypoint manager and get the closest available

one.

If there is one free and if it is, then we initialize it and we notify that it's in use so that no

other agent can use it as well.

After we either get to a point where we don't get if we did had a waypoint, then we can generate the

move path using the functionality from the nav mesh from the current position of the air tank to the

current waypoint position.

This will generate a sequence of steps that we can fit into our tank mover.

In the case that we don't have on waypoint, then we will generate a random number and you use those

numbers and add it to the current positions X and Z, so that the tank will move slightly around after

the closest random position maximum is reached.

Then the tank will opt for a more faraway position.

This will make the tank more dynamic.

After this, we will have in a post X and post Y two different values, and we generate the new patrol

point and then we get the path to that.

So when this whole sequence finishes in, move path will either have a move path towards a new waypoint

or a move path towards a new randomly generated location.

And we put this into the tank mover using start move.

If you do not know how the tank mover works, you should check out the tank mover video.

We also need to set the trigger of the final state machine so that it'll go into the go to position.

The difference between a trigger and a value in a fight and set machine is the fact that a value is

continuously checked while a trigger just gets triggered once the state transitions immediately, and

then that's it.

So they work kind of in a similar way.

But you have to remember for a state, variables like has a target, for example, to always make sure

to be in the right true or false state.

Otherwise you might get the wrong transitions when the new position is reached on finished moving will

be called by the tank mover and we will set the trigger back to get position.

So basically the state machine will get to position, will issue the tank mover, which will move to

that position.

When the tank mover finishes, it'll go back to get position basically will go get position, go to

position and over and over again until something happens like acquiring target or retreat functionality.

This is the patrol functionality of the agent.

I hope you enjoyed it.

Let me know your feedback in the comment section down below.

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