"Moving" events from point A to point B.

So, here's the deal. I'm working on a dumb time-waster event to have the player learn the layout of a map, and in essence, am having them move Box events from one room to another.

Currently - the setup I have is this:

Player interacts with box - decides to take it, turning on two switches and a variable, determining which box is which, "Player has a Box", "Box # (1 through 8) Is Gone" and Variable "BoxColor" ranging from 1 to 4. The Box you pick up also gains "Through ON", "Transparent ON".

While the switch "Player Has Box" is active, they cannot pick up another box, resulting in the text box "You have a box."

Moving to the Second Map where you need to put the box, you set the box down on that space, and the box color the variable has stored registers and places a "Box", but not the selfsame event from the first map.

All that worked well, until recently.

I had it so that when any of the individual "Box # (1 through 8) is Gone", switches activate, the initial box would disappear as intended. However, the switch "Player has a Box" would also activate, and make any boxes that the player had already picked up and deposited reappear. Needless to say, this became frustrating, so I tried making a Common Event, saying "If any of these boxes are picked up, turn on the respective switch.

This freezes the game, both Parallel and Autorun.

It should work that when you pick up a box, it stays invisible permanently.

Any suggestions?
Okay, I think I get it, but correct me if I'm wrong. So pretty much, all you want to do is pick up the box, and put it down in another room?
Why don't you try this.
(When you pick up the box)
Control Switches: Box #__ Up == On
Control Switches: Player Has Box == On
Control Variables: Box Colour == (whatever)

(When you go to put the box down)
Conditional Branch: Variable (Box Colour) == (whatever)
(Do whatever you want it to do)
Control Switches: Player Has Box == Off
Control Switches: Box #__ Gone == On
(That will make the box stay gone)
Branch End
if the tip above doesn't help, we need screenshots of the involved events with all pages to find out where you made mistakes.

Especially I'm questioning your use of autorun or parallels in this topic - from your description, there is absolutely nothing that would require autoruns or parallels there, and if you used one of those triggers that most likely is part of the problem.
I'm not sure I get what's going wrong, but perhaps instead of multiple events with conditions set in multiple locations, perhaps you could re-position one event with a parallel process event script like this.
PHP:
var ev = $gameMap._events[this._eventId];
// new position x=8, y=9, for example
ev.setPosition(8,9);
// self switch A to get away from the parallel for example
$gameSelfSwitches.setValue([ev._mapId,this._eventId,"A"],true);
You could also set position from game variables.
PHP:
var ev = $gameMap._events[this._eventId];
ev.setPosition($gameVariables.value(1), $gameVariables.value(2));
$gameSelfSwitches.setValue([ev._mapId,this._eventId,"A"],true);
I had 100% scrapped the event before replying here, but so you all know, I'm working on remaking it with your guys' ideas. Thanks so much. Details when I have them.

EDIT:
Following HexMozart's diagram, the box does not "go away" when it is lifted.
Spoiler: To avoid filling space:
f069sz.png

r079eu.png

as far as the coding:
Spoiler: To save space again:
spvdyh.png
ayvudg.png
6emd7r.png
The final page of the event has the box sprite, that is why it is still visible on the map after you pick it up - because you activate the final page with the "player has box" switch.

However, I think you make this too complicated anyway, I suggest a simpler method.

1) make one item for each box in the database for items - no functions at all, just so that if the player takes the box, it can appear in your inventory.
2) each box events above gets three pages - first page where the box is visible and the player is asked to pick it up (before the question, use conditional branch to check if player can carry something). If he decides to pick it up, add the item to inventory and only make the switch "player carries something" on (for check in the mentioned conditional branches on the other events).
second page without sprite or any content, conditioned to "item" - if the player is carrying that box, it will vanish.
third page conditioned to switch "box placed on other map", again no content and no sprite
3) On the target map, where you ask the player to put down the box, you remove it from inventory and turn on the switch for the box to have been placed there.
@mogwai I'm... not quite sure what you're getting at. Sorry, I'm still very new to scripting as a whole.

@Andar
Even with the item system, the box would still have to be visible when a player has a different box. With the 3 page system we've been experimenting with, the box is still visible simply because there will be a collision with "player has box" and "box # is missing" depending on which box is picked up. The fact that the placing of the box is conditioned by an item would keep us in this same issue. After a bit of tweaking, I narrowed the issue down to a 2 page system:

If: Playerhasbox is ON:
Display Text: You already have a box.
Else:
(code for picking up a box)

Will test this out in a bit.
@purplekirby54 That is why I wrote that part about "box placed on other map"-switch.
It should not conflict when that is done correctly, but I don't have time to make screenshots.
Just tested what I described out. Everything seems to be in working order.

Original thread: https://forums.rpgmakerweb.com/threads/moving-events-from-point-a-to-point-b.76189/