2 comments
for i,z in ipairs(zombies) do
You are basically saying for each index and each zombie in the zombies table, run the following code...
Index is the place in the array, zombies[index] will return the value in that table, as an example:
x = {"I", "am", "cool"}
If we do x[2]
we will get am
from the table, since am
is at index
(place/position) 2 in the table
the z
represents the value itself, take the above example, if we do for index, word in ipairs(x) do print(index, word) end
, we'll get the following output:
1 I
2 am
3 cool
In that order
If you have trouble understanding some topics, getting a tutor might help you a bunch, might make the learning process more fun and encourage more learning
I am thinking of getting a tutor at some point when finances allow it, and try and find a mentor at some point as well :(