How to open a menu when clicking a sprite?

This isn’t making a Start or Game over menu, but if trigger is click a sprite, action will open a navigable menu. Like with Super robot wars.
Clicking a robot, then opening menu, attack, move, special, etc.
Even opening inventory if possible.

Preferably, menu appears just next to the sprite. And not clipping the border.
Thanks in advance.

You could try putting all menu items on a layer, make it invisible and add the action to “show” on click or “hide” when the mouse button is released. To make it appear next to the sprite, set the X/Y positions on the menu objects to be near the sprite (i.e., player.X(); player.Y()) and if you want it a little distance away, you can do something like player.X() + 100 or whatever amount is best. Replace “player” with the actual name of your sprite object.

3 Likes