You have to use a type 01 levelscript which is designed to instantly perform setmaptile commands. Have it check the flag you used to mark the event and then change the tiles however you want. Because of the script type, you won't have to mess around with variables for it to work :)
I've managed to insert it, but you're not going to be able to edit/ even fly to large parts of it since the map is to large.
The routes, cities, caves etc. of the map needed to be be in a 21x14 rectangle of 8x8 blocks (168 x 112 pixels) so those outside that area can't be edited in A-Map (You can see this area in the WM editor of A-Map). Sorry I didn't mention it earlier, but I only remembered once I had inserted it and looked at it in A-Map. You're either going to have to live with a map which you can't access parts of, or make a small maps :<
Sorry, but it completely passed my mind when I was doing it ;_;