eastern-flames/eastern flames/scripts/array_greatest/array_greatest.gml

12 lines
223 B
Plaintext
Raw Permalink Normal View History

2022-08-07 21:14:04 +00:00
function array_greatest(array) {
var bigshot = -infinity;
var bigshotat = -1;
var i;
for (i=0; i<array_length(array); i++) {
if bigshot < array[i] {
bigshot = array[i];
bigshotat = i;
}
}
return bigshotat;
}