Tile Swap

Someone wrote a map swapping script, where you could copy an area of tiles from one map to another. I think that would be better than this script for your purposes, as if you wanted to do a detailed map, it would take quite a lot of calls to change groups of tiles as well as individual tiles with this method.
thanks 🙂
Hello, this Script looks Amazing.

But i found a BUG.

The "pos_swap Command" is working perfect, but the "pos_revert Command" is acting very strange.

I changed all Tiles on my map and now i have the Problem that

it does not revert  the chosen Position.

Insteed it changes back the last tile tile on the y axis.

If i repeat the command, it keeps reverting the tiles on that line until the chosen coordinate is reached.

if i choose pos_revert(0, 4, 2, 1)

so if i have a x=0 than it also pulls up the swapped tiles from the line beneth.graps y=5 line and puts it into y=4 and than continues to revert the line tile by tile everytime i call the command.

That is strange.

My english isnt the best so i hope i could explain it well enough.

I would be happy if this function could be repaired.

Edit: your explanation in topic1 is a little incorrect:

pos_revert(x, y, tid, layer, map_id)

it is actually:

pos_revert(x, y, layer, map_id)

???

EDIT: Thank you Hime for Answering in your Block within 1Day and Repairing it too.

You are amazing, thank you very much. This is great suport.

If iam able to make a little Fog of War Event Function, i will share it here with you.
@


Tsukihime



i know this is an old thread but i hav e to ask does this work on rpg maker MV, i mean tis script is for ace i just want ot know if it works on MV
@kreedves no script for Ace will ever work on MV as those use completely different languages.
@kreedves no script for Ace will ever work on MV as those use completely different languages.

@Andar ok thans ill ask her to make a similiar script in mv...assuming there isn't one already
This script was working before for me but now it gives an error and I cannot figure it out.

Script Call: region_swap(16, B33, 0, 1)

Error Message: unitialized constant Game_Interpreter::B33

If I remove B I get an error about ucase.

What am I doing wrong?

[I shall try to hide my embarrasment and shame as I write a reply:]

As a programmer I should know better when dealing with characters like A, B, C, D, and E. They are called 'strings'. Strings are enclosed in quotes "". For this to work properly you need to have quotes aroung the B33 as in "B33". Brain out of bounds error there.

I could remove this, but in case there are others who has OutOfBound brain errors, I will let it stay to remmind them.

Original thread: https://forums.rpgmakerweb.com/threads/tile-swap.2879/