Hey,
I have been working to get evolution items into the game. I have them working, for the most part. You can select it from the items menu, and then use it on a monster, who will evolve if they have an item based evolution that matches the used item. However, once the evolution ends and the room fades out, the game crashes and I'm not quite sure how to fix it. Here is the crash message:
############################################################################################ ERROR in action number 1 of Step Event0 for object obj_roomchangefade: room_goto argument 1 invalid reference to (room) - requested -12341 max is 8 at gml_Object_obj_roomchangefade_Step_0 (line 7) - room_goto(my_room) ############################################################################################ gml_Object_obj_roomchangefade_Step_0 (line 7)
Here is the code of the evolution item:
///itemuse_evolution(amp_id,EvoItem) function itemuse_evolution(argument0, argument1) { var monamp = argument0; var monid = global.active_monster_party[argument0,amp_MONID]; var nevo = NONE; for(c = 0; c < global.monster_data[monid,mond_TOTALEVOLUTIONS]; c++) { if(global.monster_evolution_type[monid,c] == evotype_ITEM) { show_debug_message("Evolution type equals item") if(global.monster_evolution_arg[ monid,c] == argument1) { nevo = global.monster_evolution_mon[ monid,c] inventory_lose_item(my_item,1) ds_queue_enqueue(global.pending_evolutions_queue,[monamp,nevo]) room_goto_fade_dontdestroy(rm_evolution,60) break; } } } if (nevo == NONE) { msh_itemuse_show_party_effects("It wouldn't have any effect.") } }
I feel like I must be missing something about the room_goto_fade_dontdestroy function, but I don't know what. Any help would be appreciated. If you need any more details, let me know.