eastern-flames/eastern flames/scripts/c_getstats/c_getstats.gml

15 lines
427 B
Plaintext
Raw Normal View History

2022-08-16 22:28:01 +00:00
function c_getstats(target) {
var dudes = variable_struct_get_names(target.data);
var lads = variable_struct_get_names(st);
var chaps = [];
var i;
for (i=0; i<array_length(dudes); i++) {
while !array_contains(lads, dudes[i]) || dudes[i] == "hp" {
array_delete(dudes, i, 1);
if i >= array_length(dudes) break;
}
if i >= array_length(dudes) break;
array_push(chaps, target.data[$dudes[i]]);
}
return chaps;
}