The Tilemap
We grab our “set tilemap” block from the Scene section. Make sure the dimensions are 10×8 in the bottom left.
If you’d like, we should add some ground patches for our Pokémon to stand on.
Variables
Variables are a placeholder for data. Think of boxes. They normally are an empty box, but they can easily become the shoe box, games box, toy box, and more depending on what we put inside. These variables are integers (numbers).
We create variables by clicking on the Variable section and clicking Make New Variable at the top. We will call these “oppPos” (opponent Position) and lives (until we lose). Set lives to be 3.
Arrays
Arrays are variables that hold a bunch of one kind of data. Think back to the shoe box; it can have all kinds of shoes like Nike’s, Reebok’s, Puma’ss, and more. But you usually only pull out one pair at a time. Arrays work the same way.
To make an array, find the Arrays section under Advanced. Grab and drop the “set list to array of” block. “List” is the name of our Array, which we can change just like our variables in Pac-émon game. Make a new Variable called “playerTeam” and another array called “enemyTeam. Fill them with the sprites we made for you.