So basically, I want it where if I press A, it opens the minimap full screen and still keeps the game going in the background, but if I press A again, it closes the minimap and shows it smaller in the bottom left of the screen. Can anyone help me?
That’s supposed to happen
Are you using the minimap extension? I completely forget how that works (I tried to use it once but it’s such a laggy extension) so I’ll have to look at it when I get home. From what I remember, this seems like something that would be very easy to do, just using a variable to keep track of which state your minimap is in. Especially since you want the game to continue in the background.
If you send a link to your game it would be easy to identify the issue
I doesn’t happen; I want it to.
Yeah, I’m using the minimap extension, I tried hiding the sprite for the map, but that just hides the sprites I’m showing on the map, It doesn’t hide the map itself. I also have another question: How to limit how much the map shows? Like make it show maybe 15 tiles away from the player, and only show the whole map if A button is pressed.
Here you go: https://arcade.makecode.com/S25969-11219-70485-65527
By the way, since I can’t import in the extension, I just changed the minimap demo.
Ok Here is a fixed version:
First I added a “minimapOpen” boolean (true/false) value. I set it to false when the game starts
Then I give the player control over the variable with the A button. This setup changes whatever the variable previously was to its opposite, eg. (true->false) (false->true)
Lastly, I tell the game to adjust the minimap’s size and position based on the variable. Youve already enabled the sprite flag “relative to camera” to the minimap so this is easy.
This will allow the player to toggle an enlarged minimap with the A button. Here is a link to the new code: https://makecode.com/_f9caHtWayVUs
Thank You! This helped a lot!