Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

GMRoomPack

Package GameMaker rooms and load them as you please · By YellowAfterlife

where to start

A topic by Jezzarb created Mar 19, 2021 Views: 130 Replies: 3
Viewing posts 1 to 3

im not really sure how to use this

so i created a json map with the helper to a gml script


i put this in a object create event 

room_pack_load_file(scr_rm_city_outskirts, x=128, y=0,room_pack_flag_instances  | room_pack_flag_backgrounds | room_pack_flag_sprites)

and the rooms not showing?

Developer

The documentation contains examples and explains the concepts

If you exported a room to a script, it would be

var map = scr_rm_city_outskirts();
room_pack_load_map(map, 128, 0);
ds_map_destroy(map);

=val after argument names indicate what the argument will be assigned to if you do not provide it, by the way.

Deleted 181 days ago

so i added room_pack_blank_object = obj_blank like the document said

now i get this error?

ERROR!!! :: ############################################################################################

ERROR in

action number 1

of Create Event

for object Object25:

PerformEvent recursion depth failure - check for infinite loops, check objects for parenting

 at gml_Script_room_pack_raw_add_layer (line 266) - var l_rnext=instance_create_layer((l_rx+l_qinst[?"x"]),(l_ry+l_qinst[?"y"]),l_rl,l_base);

############################################################################################

gml_Script_room_pack_raw_add_layer (line 266)

gml_Script_room_pack_raw_run_impl2 (line 360) - room_pack_raw_add_layer(l_lrs[|l_lrk]);

gml_Script_room_pack_load_map (line 62) - room_pack_raw_run_impl2(l_map);

gml_Object_Object25_Create_0 (line 4) - room_pack_load_map(map, 128, 0, room_pack_flag_all);

gml_Script_room_pack_raw_run_yy_inst_cc (line 135)

gml_Script_room_pack_raw_add_layer (line 295) - room_pack_raw_run_yy_inst_cc(self,l_qinst);

gml_Script_room_pack_raw_run_impl2 (line 360) - room_pack_raw_add_layer(l_lrs[|l_lrk]);

gml_Script_room_pack_load_map (line 62) - room_pack_raw_run_impl2(l_map);

gml_Object_Object25_Create_0 (line 4) - room_pack_load_map(map, 128, 0, room_pack_flag_all);

gml_Script_room_pack_raw_run_yy_inst_cc (line 135)

gml_Script_room_pack_raw_add_layer (line 295) - room_pack_raw_run_yy_inst_cc(self,l_qinst);

gml_Script_room_pack_raw_run_impl2 (line 360) - room_pack_raw_add_layer(l_lrs[|l_lrk]);

gml_Script_room_pack_load_map (line 62) - room_pack_raw_run_impl2(l_map);

gml_Object_Object25_Create_0 (line 4) - room_pack_load_map(map, 128, 0, room_pack_flag_all);

gml_Script_room_pack_raw_run_yy_inst_cc (line 135)

gml_Script_room_pack_raw_add_layer (line 295) - room_pack_raw_run_yy_inst_cc(self,l_qinst);

gml_Script_room_pack_raw_run_impl2 (line 360) - room_pack_raw_add_layer(l_lrs[|l_lrk]);

gml_Script_room_pack_load_map (line 62) - room_pack_raw_run_impl2(l_map);

gml_Object_Object25_Create_0 (line 4) - room_pack_load_map(map, 128, 0, room_pack_flag_all);

gml_Script_room_pack_raw_run_yy_inst_cc (line 135)

gml_Script_room_pack_raw_add_layer (line 295) - room_pack_raw_run_yy_inst_cc(self,l_qinst);

gml_Script_room_pack_raw_run_impl2 (line 360) - room_pack_raw_add_layer(l_lrs[|l_lrk]);

gml_Script_room_pack_load_map (line 62) - room_pack_raw_run_impl2(l_map);

gml_Object_Object25_Create_0 (line 4) - room_pack_load_map(map, 128, 0, room_pack_flag_all);

gml_Script_room_pack_raw_run_yy_inst_cc (line 135)

gml_Script_room_pack_raw_add_layer (line 295) - room_pack_raw_run_yy_inst_cc(self,l_qinst);

gml_Script_room_pack_raw_run_impl2 (line 360) - room_pack_raw_add_layer(l_lrs[|l_lrk]);

gml_Script_room_pack_load_map (line 62) - room_pack_raw_run_impl2(l_map);

gml_Object_Object25_Create_0 (line 4) - room_pack_load_map(map, 128, 0, room_pack_flag_all);

gml_Script_room_pack_raw_run_yy_inst_cc (line 135)

gml_Script_room_pack_raw_add_layer (line 295) - room_pack_raw_run_yy_inst_cc(self,l_qinst);

gml_Script_room_pack_raw_run_impl2 (line 360) - room_pack_raw_add_layer(l_lrs[|l_lrk]);

gml_Script_room_pack_load_map (line 62) - room_pack_raw_run_impl2(l_map);

gml_Object_Object25_Create_0 (line 4) - room_pack_load_map(map, 128, 0, room_pack_flag_all);

gml_Script_room_pack_raw_run_yy_inst_cc (line 135)

gml_Script_room_pack_raw_add_layer (line 295) - room_pack_raw_run_yy_inst_cc(self,l_qinst);

gml_Script_room_pack_raw_run_impl2 (line 360) - room_pack_raw_add_layer(l_lrs[|l_lrk]);

gml_Script_room_pack_load_map (line 62) - room_pack_raw_run_impl2(l_map);

gml_Object_Object25_Create_0 (line 4) - room_pack_load_map(map, 128, 0, room_pack_flag_all);

gml_Script_room_pack_raw_run_yy_inst_cc (line 135)

gml_Script_room_pack_raw_add_layer (line 295) - room_pack_raw_run_yy_inst_cc(self,l_qinst);

gml_Script_room_pack_raw_run_impl2 (line 360) - room_pack_raw_add_layer(l_lrs[|l_lrk]);

gml_Script_room_pack_load_map (line 62) - room_pack_raw_run_impl2(l_map);

gml_Object_Object25_Create_0 (line 4) - room_pack_load_map(map, 128, 0, room_pack_flag_all)

Developer

Seems like the room that you are loading contains an object that runs room loading code, causing GameMaker to repeatedly load rooms until it hits a hard limit.