I was making a little custom way to place items in the world and was using regions to do so. Everything seems to work perfectly so far, except I don't want players to be able to place items on top of each other. I figured the best way to do this was to change the region id, but I can't find any command that does this. I found the command "change_region_id(x, y, new_ID)" for VX but that doesn't seem to work in MV. Am I missing something or will I need to find a different way to do this?
Changing Region ID
Learning JavascriptThere is no such command in either VX or Ace. If you found that command, it would have been in a script that someone wrote. Likewise, if you want to do it in MV, you will need a plugin.
How do you allow the player to place the item? Do you create an event and they can actually see the item? If so, you can use $gameMap.eventsXy().size > 0 which will tell you if there's an event on that location.
How do you allow the player to place the item? Do you create an event and they can actually see the item? If so, you can use $gameMap.eventsXy().size > 0 which will tell you if there's an event on that location.
That will work. Thanks! Won't be able to say make a table event and put an item on it, but I suppose that's not necessary. If you do think of a way though, I'll take it!
I'm sure there are event spawning scripts/plugins around.
the best
That plugin doesn't really do anything for me unless I'm missing something. This places events in certain locations, which I've already done. I just wanted to use regions to restrict where things could go. I was using no region as anything can be placed, region 1 as nothing can be placed, and region 2 only certain items can be placed, but this region would only be in locations that already have certain placed items. I was intending on changing regions as soon as specific items were placed, but I think I found a workaround to do exactly what I wanted, just not as clean and simple as I was hoping.
Original thread: https://forums.rpgmakerweb.com/threads/changing-region-id.69829/