All language subtitles for 1. GDScript Intro Variables

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

0 Welcome to the quick introduction to programming. 1

If you're a beginner, then definitely don't skip this. Since we will be using code to implement various 2

systems, 3

it's always a good idea to get up to speed. 4

All of the code will be in GDScript, 5

Godot's native scripting language. 6

Let's look at the core building blocks and how to use them to create more complex functionality. 7

First, I want to mention that all of these examples are available in the downloadable project in the 8

course. If we look at the variables scene: 9

We have the script, by the way. 10

We will discuss first about variables. 11

Variables are used as data containers. 12

They can store numbers, strings and even more complex things as objects, materials and whatever 13

the developer needs. 14

They do come in more shapes and sizes. 15

Usually when creating a new variable, it can store only one thing at a time. 16

This is good for values like hit points, damage, speed, etc.. 17

When we are discussing about variables, a core concept is called a "variable declaration" and that one 18

means to let the engine know that we are creating a new variable. 19

The declaration goes like this. 20

Var which is an operator and then the name of the variable that can be whatever you like. 21

I'll just keep it: "a" 22

So by doing this 23

"var a" I'm actually specifying that hey, I want a variable called a from now on so I cannot use it 24

before this. We can also initialize the variable when we declare it by putting an equal and then putting 25

a number, a string or an object. To display the variable in the console 26

we can use a handy function called print() and then in its parenthesis as a parameter we can specify 27

a 28

in this case. We can try it by pressing f6 and of course we will get five because that's the value contained 29

in the variable E. 30

Now let's look at the string and the string is very similar. 31

You can see we can just call it string. 32

By the way, we can specify the type of a variable by adding colons to it. 33

So if I say: string. 34

Then this variable will be a string. 35

Why is this important? 36

Because if we want to assign later another type, then we will get an error because only string is available 37

for this one. 38

Keep in mind that if we don't put this, then we can assign whatever we want. 39

But this will create confusion 40

later in the code. A float variable means a number that has decimal points. 41

For example, PI, which is 3.1415 and so on and so forth. 42

When we need a list of elements, let's say a list of words we can use lists. 43

Lists or arrays are also variables. 44

The main difference between them is the fact that they can store multiple values chained one after another. 45

They are good to store groups of items like inventories, enemies, projectiles. To create an array 46

we can declare it as a regular variable and then just use these brackets. 47

And we have an array. 48

We can also initialize the array as it's here with different values separated through commas. 49

Keep in mind that to reference a particular value in this way we can just say array and then in the 50

same brackets we can just specify the index starting from zero, which would be one in this case, one 51

and two, which would be three. 52

So this is 0, 1, 2. 53

We can also get the size of an array by calling array dot size and this will return three. 54

The array also can be passed, but that is for later on. 55

Another type is also vector2, which is a Godot type and vector2 stores, a pair of values x 56

and y. 57

We can define it like this. And to call it we just say "vec" because that is the name of the variable. 58

And vec.x or vec.y 59

Of course there is vector3 and more. 60

You can find all of the types supported by the GDScript in the link down below.

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