• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Map] Setmaptile partially working

120
Posts
5
Years
  • Age 25
  • Seen Nov 2, 2023
I placed some boulders to block the entrance of a city before a certain trainer in other town has been defeated (when his flag has been set and in his case I used flag 0x228). I then used a level script with "setmaptile" to turn boulders into grass and make the path walkable (I set the behaviour byte to 0x0 so the player can walk.) Upon returning the path was replaced with appropriate blocks as well as movement permissions and I was able to further progress. Then, problems started happening. When I enter certain towns and return to the town with the setmaptile level script, things work correctly, but there are a couple of other maps that cause issues. In those other maps upon returning, only the blocks have been replaced, but they are still not passable. I thought that those maps that were causing errors had a level script of their own that would perhaps clear the flag but that wasn't the case (I deleted the level scripts there just to make sure.) Any help would be appreciated.
 

Child Amnesiac

Ever changing
341
Posts
5
Years
I placed some boulders to block the entrance of a city before a certain trainer in other town has been defeated (when his flag has been set and in his case I used flag 0x228). I then used a level script with "setmaptile" to turn boulders into grass and make the path walkable (I set the behaviour byte to 0x0 so the player can walk.) Upon returning the path was replaced with appropriate blocks as well as movement permissions and I was able to further progress. Then, problems started happening. When I enter certain towns and return to the town with the setmaptile level script, things work correctly, but there are a couple of other maps that cause issues. In those other maps upon returning, only the blocks have been replaced, but they are still not passable. I thought that those maps that were causing errors had a level script of their own that would perhaps clear the flag but that wasn't the case (I deleted the level scripts there just to make sure.) Any help would be appreciated.

It's probably the final value of your setmaptile commands, are they set to 0?
Zero means the tiles are passable, 1 means the tiles are impassable.
 
Last edited:
120
Posts
5
Years
  • Age 25
  • Seen Nov 2, 2023
The final values of setmaptile were correct, so that wasn't the problem. I figured that the setmaptile script has certain bugs when it has to work 7 to 8 tiles from the beggining of the map or something like that. I however managed to temporarily fix this by placing normal script boxes with the same setmaptile script on top of the level script because for some reason, the level script only changes blocks and normal script changes movement permissions.
 
Last edited:
11
Posts
4
Years
Someone would have to see your code to know for sure, but it might be one of these issues.

- Tile is set to a different elevation from where you enter
- The flag 0x228 might be used somewhere else in your rom that toggles the even off
- Certain tiles have special properties outside of initial scripting (pokeblock feeders, trees, strength boulders, et.). Maybe trying a different starting tile might clear this bug
 
Back
Top