Player Function
This function is only used in the beginning to create us and our controls. We need to create our sprite and fill it with a preset, give control with buttons, set our position (top left corner), and use the new Scene block “camera follow sprite mySprite” to make the camera follow us around.
Don’t forget to add it to your “on start” block.
Reset Screen
This function will reset our screen back to our “overworld” instead of being on the battle screen.
To achieve this, we first need to duplicate our tilemap block. No changes are needed.
Add the Sprites block “set mySprite image to” with a duplicate of your trainer sprite.
Add a move block making sure to click the plus and have it say 100 for both.
Add the Sprites position block filled with new variables “newX” and “newY”. These will hold our location when we enter a battle screen so we don’t end up all the way back at the top.
Add the camera block without changing anything.