Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Could you please do the following?

In msh_spawn_monster_list, add a line:

show_debug_message("Spawn list:" + string(id))

In mev_pause_monsters_release_confirm, add some code after "amp_clear_monster":

show_debug_message("Update:" + string(daddy.daddy))
with(obj_gguimenu){
  show_debug_message(tsprintf("ID: %, %x%",id,menu_w,menu_h))
}

Then when releasing a monster, check the "Output" window and it'll print some messages with the ID data.

The IDs used for the "Spawn list" and "Update" printouts should be the same (I suspect you forget to set "daddy" accordingly in one of the menus when creating the child menu), and we print ALL the IDs (with menu size alongside it) just in case the results are still weird.

Here are the results:

Spawn list:100073
Update:100073
ID: 100075, 1x2
ID: 100074, 1x5
ID: 100073, 1x4
ID: 100072, 1x6

Also, figured I'd include the two scripts (release and release confirm). Here is first:

///mev_pause_monsters_release() function mev_pause_monsters_release() {     with(instance_create_depth(x,y,depth-1,obj_gguimenu)){         daddy       = other.id         my_monster    = other.my_monster         ggui_frame(other.ggui_frame_l[0] + 96,other.ggui_frame_t[0] + 48,128,64,spr_messagebox)         ggui_menu_preallocate(1,2)         ggui_element_text_settings(font_mainmsg,c_white,0,0)         ggui_menu_add_option_text(mev_pause_monsters_release_confirm, "Release", "")         ggui_menu_add_option_text(mev_cancel, "Cancel",    "")     }  }

and the second:

///mev_pause_monsters_release_confirm() function mev_pause_monsters_release_confirm() {     show_debug_message("Update:" + string(daddy.daddy))     with(obj_gguimenu){       show_debug_message(tsprintf("ID: %, %x%",id,menu_w,menu_h))     }         daddy = other.id         message_spawn(tsprintf("You released %.",amp_get_monster_name(my_monster)))         array_delete(global.active_monster_party,my_monster,1)         array_insert(global.active_monster_party,AMP_FIRST_ACTIVE + PARTYSIZE_ACTIVE - 1,[])         amp_clear_monster(AMP_FIRST_ACTIVE + PARTYSIZE_ACTIVE - 1)         with(daddy.daddy){             msh_spawn_monster_list(mev_pause_monsters)         }         instance_destroy(daddy)         instance_destroy()  }
(+1)

It looks like the ID is right in the printout, but we change it later (and then there's no second printout when we UPDATE daddy.daddy, so the reference is to something that doesn't exist?) so I think changing mev_pause_release_confirm like this should fix it:

///mev_pause_monsters_release_confirm() function mev_pause_monsters_release_confirm() {     var granddad = daddy.daddy;              message_spawn(tsprintf("You released %.",amp_get_monster_name(my_monster)))         array_delete(global.active_monster_party,my_monster,1)         array_insert(global.active_monster_party,AMP_FIRST_ACTIVE + PARTYSIZE_ACTIVE - 1,[])         amp_clear_monster(AMP_FIRST_ACTIVE + PARTYSIZE_ACTIVE - 1)         with(granddad){             msh_spawn_monster_list(mev_pause_monsters)         }         instance_destroy(daddy)         instance_destroy()  }
(+1)

It seems like that has fixed it. Thank you for all your help.