Hi all! I'm working on a save and load system for my game that allows you to select an object in a turn-based combat system, then transfers the player to another room in order to engage in action combat, that return to the previous room and resume combat. The only problem is the enemies aren't loading back in, since they're created by an external object (obj_clockwork colliding with obj_player)
Does anyone know how to solve this? Thank you!
############################################################################################
ERROR in action number 1
of Create Event for object obj_battle_controller:
Variable <unknown_object>.enemies(100029, -2147483648) not set before reading it.
at gml_Object_obj_battle_controller_Create_0 (line 49) - for (var i = 0; i < array_length(enemies); i++)
############################################################################################
gml_Object_obj_battle_controller_Create_0 (line 49)
gml_Script_load_room (line 116)
gml_Object_obj_game_Step_0 (line 4) - load_room();