We have success
@bass2yang !
Reset the numbers as you indicated. The event pages were set up correctly, the problem indeed was passability settings on the B Tileset. Once I cleared that up, everything works perfectly, as does the reset function. You're a wizard!
I think to tie it all up, I wonder if I could ask just one final question, since I just can't seem to wrap my aged brain around Math.randomInt. I'll do the proper study on it for sure but for now, if I continue adding garbage images (just in the left column of the tileset), lets say I add another row of 8 garbages, I would change "(8) + 40" to "(16) + 40", yes?
But that's it! Thanks tons for holding my hand through this, it's a big deal for my project and super appreciated.
Awesome! That's good to know that passability also affects the event since it is utilizing the tile ID - I will make note of that.
Math.randomInt(8) + 40 basically means "Randomly choose from 8 integers (0-7) and add 40 to it", making the range 40-47.
Correct! Math.randomInt(16) + 40 is "randomly choose from 16 integers (0-15) and add 40 to it", making the range 40-55.
You are welcome and I'm glad it worked out for you!
When working with the engine, always approach it with the event commands first until you know that a script call or a plugin would be more efficient or is needed. As you have already experienced, debugging took the longest, but you also learn a lot about the engine as well. Basically, event commands are RTP/preloaded script calls to the corescripts of the engine), script calls are custom event commands, and plugin commands are simple to read/write (depending on the plugin)
syntax that calls a custom group of functions and makes them work together to extend the system (as defined by the plugin).
Seeing that this mechanic would have needed several pages of event commands, variables, conditions, etc. (which would have been harder to set up since it was unable to use some of the powerful functions like filter/reduce/for-of without a script call), it was better (at least from my perspective currently) to create a script call for it (really, only a couple of lines when you think about it).