M
Midastouch
Guest
Hello everyone,
I have a little question.
I want to return the lowest value around a point.
So i did this code :
But now i want to have the "id" of the grid which has the lowest value.
Can you help me?
I have a little question.
I want to return the lowest value around a point.
So i did this code :
GML:
for(var xx = 0; xx <= size; xx++) {
for(var yy = 0; yy <= size; yy++) {
if world[xx][yy].elevation > 95 {
var a = world[xx-1][yy].elevation
var b = world[xx+1][yy].elevation
var c = world[xx][yy-1].elevation
var d = world[xx][yy+1].elevation
var min_ = min(a,b,c,d)
}}
}
Can you help me?