It can be done using DynamicSprite.CopyTransparencyMask(int fromSpriteSlot)
Create and import a sprite that contains a filled circle (i.e. has the transparency mask you need)
Each game loop
1. create a DynamicSprite from the map sprite and use the player coordinates to crop it
2. use the above command to copy the transparency mask from the circle sprite to your dynamic map sprite
3. assign the GUI-sized and rounded sprite as your GUI's background image
Note that the DynamicSprite pointer has to be declared above your room_RepExec function as opposed to inside it.
Something like this:
Code: ags
(You can also get rid of the arrow button, too, and draw the arrow onto the map sprite if you want)
Create and import a sprite that contains a filled circle (i.e. has the transparency mask you need)
Each game loop
1. create a DynamicSprite from the map sprite and use the player coordinates to crop it
2. use the above command to copy the transparency mask from the circle sprite to your dynamic map sprite
3. assign the GUI-sized and rounded sprite as your GUI's background image
Note that the DynamicSprite pointer has to be declared above your room_RepExec function as opposed to inside it.
Something like this:
DynamicSprite* map;
function room_RepExec()
{
map = DynamicSprite.CreateFromExistingSprite(MAP_SLOT);
map.Crop(player.x / 10 - 64, player.y / 10 - 40, gMinimap.Width, gMinimap.Height);
map.CopyTransparencyMask(CIRCLE_SLOT);
gMinimap.BackgroundGraphic = map.Graphic;
Btnarrowminimap.NormalGraphic = 3220 + player.Loop;
}
(You can also get rid of the arrow button, too, and draw the arrow onto the map sprite if you want)