MV Problem with GALV EventSpawner

Hello everyone, I have a problem with the Event Spawner plug-in of GALV, let me explain, I have a random object spawn system in my game, the current system consists of putting several events on the map manually, these events have a random value variable between 0 and 10, if the random value is ≤ the variable “probability of obtaining objects” a common event is executed that increases +1 the variable “amount of objects in the level”, this serves me to have a counter of objects on the map so that the player knows that there is something to look for. Once this common event is executed and this variable is added, the local switch A is activated and the object appears, otherwise if the condition is not met the event enters a loop with a label and the object does not appear until the player moves to another room or re-enters the same one again. However when I make this event appear with the GALV EventSpawner plug in, the counter doesn't work correctly and usually mark wrongly the objects that appear, and I don't know why this happens, if you can help me once again, I would appreciate it, thank you very much for your support in previous posts, thanks to you my desire to finish this game is becoming more real ❤

Edit: I have noticed that this only happens when the player enters a different room and then re-enters the previous one, if the player always enters the same room the error does not occur

Spoiler: Event
1730840949191.png
1730840978699.png
1730841012702.png
1730841026653.png
1730841049295.png
1730841311405.png
are you using the counters for every map?
because that sounds as if you did something wrong with resetting the numbers from previous entering the maps.
are you using the counters for every map?
because that sounds as if you did something wrong with resetting the numbers from previous entering the maps.
Events that function as objects are counted alone, since depending on the value of the random variable that each one of them has, they may or may not appear. If they do appear, a common event is activated that causes another 1 to be added to the counter. In short, every time an object appears that counter should be added, and with my previous object spawn system this worked perfectly well, it only works poorly with this plugin, but I want to make it work since it saves me a lot of work by not having to put each spawn on the map individually
that doesn't answer my question.

do you use different variables for each map, or do you reuse the variables?
that doesn't answer my question.

do you use different variables for each map, or do you reuse the variables?
I reuse them
then you have a problem with initialising them if you go back to a map previously used.

if you re-use variables, they need to be reset correctly on entering a map.
However if the structure only works going ahead and not when going back, then something is keeping old values.

you need to find that something and correct whatever mistake you made there.
so where do you delete the old values before the next map?
then you have a problem with initialising them if you go back to a map previously used.

if you re-use variables, they need to be reset correctly on entering a map.
However if the structure only works going ahead and not when going back, then something is keeping old values.

you need to find that something and correct whatever mistake you made there.
so where do you delete the old values before the next map?
With the previous system, whenever the player moved to another map, the item counter was reset. This is achieved with a common event that is activated when a switch is also activated. This switch is always activated when the player moves to another map. The truth is I don't know what is wrong, because all I do is spawn the same object with this plug in, and this object already worked fine
then show us screenshots of those events that are supposed to handle that initialisation.
we can't tell what is wrong without seeing what you did
then you have a problem with initialising them if you go back to a map previously used.

if you re-use variables, they need to be reset correctly on entering a map.
However if the structure only works going ahead and not when going back, then something is keeping old values.

you need to find that something and correct whatever mistake you made there.
so where do you delete the old values before the next map?
When the teleportation event is used to move to another map, its first command is to activate the “Reset events” switch, when this switch is activated, it activates a common event that resets the variable that works as an object counter in the map and returns all the objects in its initial form, which as already mentioned, activates a variable that determines if the object will appear or not, if it appears it adds +1 to the object counter and if not, it will be in a loop between labels until the player decides to leave the map and resets the events and the counter.
Once again, your description of what you believe to be happening is not enough, we need to see screenshots of how the events look with all properties to determine what really happens.

If you don't know how to do screenshots:
press [alt]-[prtscrn] when the event window (or the database window for common events) is active, then open an image program (MS Paint if you have nothing else) and press [ctrl]-[v] to paste.
save and upload.
Once again, your description of what you believe to be happening is not enough, we need to see screenshots of how the events look with all properties to determine what really happens.

If you don't know how to do screenshots:
press [alt]-[prtscrn] when the event window (or the database window for common events) is active, then open an image program (MS Paint if you have nothing else) and press [ctrl]-[v] to paste.
save and upload.
I know how to make screenshots, the post has it if I didn't understand you right sorry.
Spoiler: Screenshots
1. The teleportation event is triggered when the player passes through region N°1.
1731016981608.png

1731017048379.png


2. Depending on the map in which the player is, a common event is activated that determines where the player will appear randomly, and in the process the events of objects are reset.
1731017149978.png

1731017179575.png

1731017196507.png

1731017212893.png

1731017245019.png
Ok I managed to solve the problem, thanks for trying @Andar but I have another one now, and that is that objects appear on inaccessible places like walls or ceilings, the default plug-in is not supposed to do this, it only makes objects appear in places accessible by the player, I checked this on a test map and it worked fine, but when I try to do it on a real map, the objects spawnean badly.
↓

1731448022322.png

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-galv-eventspawner.173054/