This.... has a lot of moving parts so in the interest of not having a million screenshots, I'll try and restrict it to the "important" stuff. However if you need additional info I'll provide it.
There are two plugins at play here.... Yanfly's Self Switches and Variables, and Galv's Event Spawner.
The scenario is I've spawned a torch event on a blank map, it defines an array in it's self variable 2 (Variable 26), then switches to a page that's reporting it's ID ($gameVariable(2)) and the Map ID($gameVariable(3)). When player makes a pathway, it runs screenshot 3... Then goes to a blank page set to action button. It's pretty much just reporting it's event ID, then running the common event "Path Locations Check" in screenshot 2. The plan is simply to push it onto the array in the torch's self variable 2 for later use. So far so good, this variable reports the array sets up perfectly and is still reported as the same when I return to the map.
Now we get to the problem, another event (screenshot 4) is created and checks for the space in front of it. If the eventID of that location isn't 0, then it report it's own eventID and runs the common event "Path Destroy Check" (Screenshot 1). This event flips a switch if the eventID is in the self variable array. If it flips the switch then both events are despawned, and the eventID is removed from the array. Up until this point, it all works....
But then if I leave the map and return, it no longer recognizes anything in the array that was placed there previously. The array still reports as having the IDs in there though. And any new IDs added to the array still trigger as normal.
Been puzzling over it for a few days, but since I'm pretty new to scripting, there's probably something silly I'm missing. Anybody have any ideas?
Edit: I moved the event holding the self variable to a non-spawned event, just to eliminate Galv's Event Spawner from the equation. The problem persists though.
There are two plugins at play here.... Yanfly's Self Switches and Variables, and Galv's Event Spawner.
The scenario is I've spawned a torch event on a blank map, it defines an array in it's self variable 2 (Variable 26), then switches to a page that's reporting it's ID ($gameVariable(2)) and the Map ID($gameVariable(3)). When player makes a pathway, it runs screenshot 3... Then goes to a blank page set to action button. It's pretty much just reporting it's event ID, then running the common event "Path Locations Check" in screenshot 2. The plan is simply to push it onto the array in the torch's self variable 2 for later use. So far so good, this variable reports the array sets up perfectly and is still reported as the same when I return to the map.
Now we get to the problem, another event (screenshot 4) is created and checks for the space in front of it. If the eventID of that location isn't 0, then it report it's own eventID and runs the common event "Path Destroy Check" (Screenshot 1). This event flips a switch if the eventID is in the self variable array. If it flips the switch then both events are despawned, and the eventID is removed from the array. Up until this point, it all works....
But then if I leave the map and return, it no longer recognizes anything in the array that was placed there previously. The array still reports as having the IDs in there though. And any new IDs added to the array still trigger as normal.
Been puzzling over it for a few days, but since I'm pretty new to scripting, there's probably something silly I'm missing. Anybody have any ideas?
Edit: I moved the event holding the self variable to a non-spawned event, just to eliminate Galv's Event Spawner from the equation. The problem persists though.
