Run Nearby Event - a simple way for creating large events and more

@ShadowDragon thanks for the reports! And I thought the one I found was really specific 😛
Give this a try and let me know it that fixes your problems.
with a short test, it seems to works smoothly again 🙂
thank you for the fix ^^
with a short test, it seems to works smoothly again 🙂
thank you for the fix ^^
Thanks for verifying 🙂

Version 1.3.4 is now available

Bugfixes
:
- Event passthrough didn't trigger in events with below or above player priority when pathfinding would make a turn on the tile of that event, and it was next an impassable tile, with the player approaching from direction opposite of said impassable tile.
- Event locking is now done in a more compatibility-friendly way.
I didn't tested passthrough, but that is also working on edges 🙂
(just to confirm it as well on my end) as Hime_EventTriggerLabel was the
one quickly testing, so awesome job on both fixes ^^
I seem to be having trouble with this one. For whatever reason, the RunEvent plugin commands don't register and using the script declares 'MAC_RunNearbyEvent is not defined.'

My current project has a lot of plugins, so to try and see if there was a conflict, I swapped to a completely clean, completely fresh new project, and used a 1-1 copy of the Chest example in the tutorial you provided, but I still encountered the same issues without any other plugins than this.

I am using version 1.3.4, although version 1.1 (The one I downloaded from the github) also gave me this issue. I have made sure that it's in my js/plugins/ folder, and have made sure that it's turned on in my plugin manager.

I've also had a friend of mine test this and received the same issue.

In F8 console, we're seeing
'js/plugins/MAC_RunNearbyEvent.js:235 Uncaught SyntaxError: Unexpected token =' at the top of the page.
It seems the author doesn't test on a basic RPGMaker MV project? It's using a syntax that's not supported in RPGMaker MV unless you manually take steps to update the underlying Chrome runtime.

The solution is to replace inp ||= with inp = inp || on the offending line.
I found another bug in this plugin – it breaks if you have a parallel common event that uses Exit Event Processing. The fix is to add a check in one of the functions:

JavaScript:
        //Aliasing exiting event processing
        void ((alias) => {
            Game_Interpreter.prototype.command115 = function () {
                if(this.eventId())
                    $gameMap.event(this.eventId()).unlock();
                return alias.call(this);
            }
        })(Game_Interpreter.prototype.command115);
I found yet another bug in this plugin. The command RunEvent this doesn't work properly if there are multiple events on the same tile. I fixed it in the core run() function, and the edit is a bit more involved than the previous one, so I'll just post the full fixed plugin (that should be fine, since it's licensed under MIT).
Version 1.3.5 is now available!

Bugfixes
:

- Fixed a crash on lower nwjs versions [by @Solar_Flare ]
- Fixed a crash with "Exit Event Processing" in common events [by @Solar_Flare ]
- When specifying directions, this will now always run the current event, rather than the first event on the current event's tile [by @Solar_Flare ]
- Running a specific page will now work even if the target event is inactive (has no active pages)



Huge thanks to @Solar_Flare for providing some fixes when I wasn't around - it's greatly appreciated!
It's funny how I somehow never caught that ||= - I guess everyone who used the plugin previously did have updated nwjs xD
Version 1.3.5 is now available!

Bugfixes
:

- Fixed a crash on lower nwjs versions [by @Solar_Flare ]
- Fixed a crash with "Exit Event Processing" in common events [by @Solar_Flare ]
- When specifying directions, this will now always run the current event, rather than the first event on the current event's tile [by @Solar_Flare ]
- Running a specific page will now work even if the target event is inactive (has no active pages)



Huge thanks to @Solar_Flare for providing some fixes when I wasn't around - it's greatly appreciated!
It's funny how I somehow never caught that ||= - I guess everyone who used the plugin previously did have updated nwjs xD
I updated NWJS to 0.48.4 so it worked for me without any problems.
so I use it a lot, which I also make plugins on this version and higher as it
shorten the code by a lot.

but lower NWJS than the version I use may fail on it.

Original thread: https://forums.rpgmakerweb.com/threads/run-nearby-event-a-simple-way-for-creating-large-events-and-more.162345/