[request] how to refresh the map?

hi there..


following problem:


I filled my whole map with 1 roof autotile. and dig holes into it via $game_map.data[x,y,layer], by filling the player (acts as cursor) with floor, and y-1 with a wall autotile.


problem now:


the surrounding autotiles and the current created are not updated to fit each other.


so my question is:


can someone write me a script to update the surrounding autotiles around the players xy and xy-1 (not the whole map, cause this will make the game stop for a moment).


hoping for an answer 🙂


Ps.: Don´t forget my other request: How to refresh the Shadowmap?
You need to update all adjacent tiles around (x,y), not just (x, y-1)


http://www.rpgmakervxace.net/blog/121/entry-454-autotile-update-script/
cool - but it´s not working correctly..


i use the "$game_map.update_all_autotiles".


To show the problem better, i made this picture show:


http://www.imagesload.net/img/problem4.png

Spoiler
problem4.png
It only takes effect on each 2nd tile.. and ignore the above/below/left/right again..:


problem_2.png
I don't understand how you expect it to look. The results look as I expect.


Does it work correctly when you do it manually in the editor? Does it do anything different than what the script is doing?
yes, it's working in the editor - but it should work at runtime!

the problem is, in the last picture of my pictureshow, i replaced the roof tile with floor tile, and when updating the autotiles, the roof tile is there again.

Original thread: https://forums.rpgmakerweb.com/threads/request-how-to-refresh-the-map.21778/