Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | JulioYagami |
It isn’t working and I don’t know why…
func rand_layer(from, to):
for y in range(to.y - from.y):
for x in range(to.x - from.x):
randomize()
var t = (simplex.get_noise_2d(x, y) * randi()%2+1) + 1
tile.set_cellv(Vector2(x, y), t)
layer += 1
What is the purpose of the layer += 1 at the end there?
xofox | 2019-09-10 17:30
It is part of the random generation logic so it can be ignored.
JulioYagami | 2019-09-10 18:18