eastern-flames/eastern flames/scripts/array_remove/array_remove.gml

12 lines
221 B
Plaintext
Raw Permalink Normal View History

2022-08-07 21:14:04 +00:00
function array_remove(array, val) {
var returnable = false;
var i;
for (i=0; i<array_length(array); i++) {
if array[i] == val {
array_delete(array, i, 1);
i--;
returnable = true;
}
}
return returnable;
}