Whenever i refer the variable "instance_count" within a live code, the game freezes.
Sometimes no errors thrown at all, sometime it shows "DoAdd :2: Malformed variable"
Tested on multiple projects, occurs everytime.
Livecoding for GameMaker: Studio / GameMaker Studio 2 · By
It would seem like this variable also cannot be read with variable_
functions, and not just that, but it’s also falsely flagged as an instance variable in fnames
file, which caused my existing workaround generator to not make a function for it
object_index*@
id*@
solid@
persistent@
mask_index@
instance_count*@
instance_id*@
instance_find(obj,n)
instance_exists(obj)
A workaround would be to do
gml_var_add("instance_count*", function(l_set, l_val) {
return instance_count;
});
on game start.