A code section that has anything with particles (I am using a system and burst here) will throw a runtime error. My code looks like this
if object && variable_instance_exists(object, "Take_Hit") {
var objX = object.x, objY = object.y, objZ = object.z;
var statuss = object.Take_Hit(inventory[overlayMenuIndex]);
var sparks = part_system_create_layer(layer, false);
part_particles_burst(sparks, objX, objY - objZ, psMiningHit);
if statuss == "Dead" {
//Reset highlight list
Fill_Selectable_List(animDirection);
highlightableListIndex = 0;
}
}
And if I make any change at all in this section, not even to the particle system at all, and then enter it in the game, it throws:
[GMLive][7/8/2026 7:40:09 AM][ERROR] Runtime error: [error] `instance#ref instance 100267(objPlayer)` (instance of objPlayer) does not have a variable `psMiningHit`.
called from mining changer [line 14, col 61]
Making changes elsewhere works fine. Closing the runner and restarting resolves the runtime error, without changing any code at all. Restarting the room or game doesn't fix it.
I just went and tried your suggestion of adding a live constant. I put live_constant_add("psMiningHit", psMiningHit); in the obj_gmlive and then the live reload during gameplay worked without a hitch.
I am running GameMaker-LTS2026 v2026.0.0.16, Runtime v2026.0.0.23