Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi Yal

Thanks for this engine. I'm steadily working my way back to using Gamemaker  thanks to it. 

Please assist with these 2 queries:

  1. There seems to be a bug that freezes the game when you enter the menu to rename monster at the shrine but cancel without going through with it.
  2. How would I go about setting it so that the player uses "back-sprites" instead of inverted enemy sprites?

The freeze seems to be because the menu is destroyed with the default cancel, which doesn't advance the cutscene you're in. can_destroy is turned off just to prevent this by default, but you could add it in as a separate destroy script as a failsafe:

In msh_spawn_namingmenu at line 10, insert a new line:

script_destroy = csc_proceed;

Also insert the same line at line 3 in cc_shrinerename.

Now the menus should proceed the cutscene even if destroyed early.


For back sprites, there's a macro mond_SPRITE_BATTLE in init_constants. You'll want to add a new mond_SPRITE_BACK macro with an unique value, go to init_monster and add a new line after line 5:

global.monster_data[argument0,mond_SPRITE_BACK]    = argument2[2];

Now go to init_monsters and add the back sprite to the array of sprites that get passed in for all monsters.

To actually read the battle sprite, I think the cleanest approach is to edit monster_get_battlesprite. Check if the AMP-ID passed in is in the "enemy" region ( >= AMP_FIRST_ENEMY), and if so return the mond_SPRITE_BATTLE sprite, otherwise return the mond_SPRITE_BACK sprite.

Thanks for the clear response. It helped get the freeze issue fixed but please note that applying the code to msh_spawn_namingmenu crashes the game as it affects the first naming menu.

I applied the fix in cc_shrinerename only. Problem solved.


Can you give me more guidance on the back sprite? For example how exactly do I

Check if the AMP-ID passed in is in the "enemy" region ( >= AMP_FIRST_ENEMY), and if so return the mond_SPRITE_BATTLE sprite, otherwise return the mond_SPRITE_BACK sprite.

(1 edit)

You'd do it like this:

if(argument0 >= AMP_FIRST_ENEMY){
  return global.monster_data[amp_read_var(argument0,amp_MONID),mond_SPRITE_BATTLE]
}
else{
  return global.monster_data[amp_read_var(argument0,amp_MONID),mond_SPRITE_BACK]
}


The other thing I was vague about was where to add the back sprites. The init_monsters script has this place where we add an array of sprites for each monster:


Edit this and add a third "back" sprite after the map sprite. (Or before, if you prefer that, but then you'll need to make sure to adjust the changes I suggested for init_monster (without an "s" at the end) accordingly)

(1 edit) (+1)

Hi Yal

Thanks again for extra info. Seems to have worked