In connection with a Friday Script feature on Hime’s tileswap script, I issued two challenges. The expert one will be in a dev blog post, coming soon. But let’s cover the other.
Brunhilde the Bruiser has a ground pound ability. When she activates it, she jumps into the air and lands with such shattering force, the very earth beneath her trembles and cracks. How can we make the ground itself split under Brunhilde’s might?
As we talked about a few weeks ago, we can use tileswap to create cracks in walls to conceal secret entrances. So what’s the difficulty with making a crack in the ground? The trick is to get the player’s position. Set up an event to call a common event.
Then, we need to build the common event. It needs to do two things:
1) Have our player jump in the air.
2) Create a crack in the ground under her feet when she lands.
The first step is easy. Just use Set Move Route, Jump, and don’t change the player’s position.
The second part requires calling pos_swap. Specifically, we want to place the tile at Layer 1 (above the ground, under a rock). We’ll use the crack tile in the standard RTP. It’s at A24, if you need a reference!
But before we call pos_swap, we need to know the correct x and y value, and the map. There are ways to do this if you’re scripting, but we can do it with events too. Just set three variables to your x, y, and map ID. After you do that, call pos_swap with those variables, and you’re set.