eastern-flames/eastern flames/scripts/c_passableeval/c_passableeval.gml

27 lines
612 B
Plaintext
Raw Normal View History

2022-08-19 01:47:44 +00:00
function c_passableeval() {
/*var i, j;
for (i=0; i<array_length(global.map); i++) {
for (i=0; i<array_length(global.map[i]); i++) {
global.map[i][j].passable
}
}
for (i=0; i<array_length(global.map); i++) {
for (i=0; i<array_length(global.map[i]); i++) {
if c_containsunit(global.map[i][j]) {
global.map[i][j].passable
}
}
}*/
}
function c_containsunit(x, y) {
var tile = c_gettile(x, y);
for (i=0; i<array_length(tile.contents); i++) {
if instance_exists(tile.contents[i]) {
if tile.contents[i].object_index = o_unit {
return tile.contents[i];
}
}
}
2022-08-20 18:53:31 +00:00
return noone;
2022-08-19 01:47:44 +00:00
}