eastern-flames/eastern flames/scripts/array_contains_within/array_contains_within.gml

12 lines
303 B
Plaintext
Raw Normal View History

2022-08-16 01:01:09 +00:00
function array_contains_within(array, val) {
var i, j;
for (i=0; i<array_length(array); i++) {
if typeof(array[i]) == "struct" {
var dudes = variable_struct_get_names(array[i]);
for (j=0; j<array_length(dudes); j++) {
if array[i][$dudes[j]] == val return true;
}
}
}
return false;
}