Heya!
I'm trying to remove all the images generated before I transfer to another map.
But somehow it's not getting deleted.
I'm just trying to roll 1-5 at the moment since I have not finished the code for the others.
So when a variable is chosen from 1-5, a selfswitch is activated, while also turning off the variable rolling.
The selfswitches basically have the same thing inside them but has different pictures depending on what was rolled.
SelfswitchA-E(using yanfly selfswitch&variables) are like the picture I attached, while F-O are blanks.
I made sure to put all the pictureIDs used by the ones from a-e in the erase picture common event.
But when I transfer, they are all still there.
Most likely a timing problem
your event pages with show picture are set to parallel and have absolutely no wait, which means that each show picture is used sixty times per second.
your exit event needs time as well - erasing a single picture does nothing if the other event shows the same picture again and again before you can transfer.
First thing is: always place a wait into EVERY parallel page to prevent lag.
the correct number of waits needs to be experimented - too few and the lag goes up, too many and the event delays its function (which looks like lag to the inexperienced user, but is no lag)
Then make sure that all those parallel event pages showing pictures are disabled as the first step of the common event, before erasing the pictures.
yes and no - there are several options of what you can and can't do, depending on circumstances.
If you never return to the same map (unlikely due to it being a shop) you could create an additional higher page and switch that one active to disable the parallels.
If you need to return to the map and need the event to start again from scratch, then you need to disable all conditions for all higher pages (which is one reason why structures like that are uncommon)
Most people that use setup events try to get the entire setup on a single event page, because then they can use erase event and it will work again after reloading the map.
An additional problem of your event is the use of self-switches. ONLY the same event has access to the self-switches, or a common event called from the same event.
Since the common event for exit is called by another map event, it has no direct access to the picture event self-switches.
So no matter what you do, you'll have to redo the event big time.
and given that, I strongly suggest you change the condition from switch to variable.
That would make your event much easier and much shorter
You need to be carefull with the numbering, but if you give each page its own page number as a variable condition, then a randomized variable will jump directly to activate that page, and setting the variable to zero will remove all conditions with one command.
just keep in mind that skipping numbers in the condition makes the next lower existing number take all solutions due to the >=, but that can be intended if you want the different pages to have different probability.