Original Source
- Original title: Have Event Move to Nearest Event With a Specific Notetag
- Original author: heydolly333
- Original date: June 17, 2024
- Source thread: https://forums.rpgmakerweb.com/threads/have-event-move-to-nearest-event-with-a-specific-notetag.169595/
- Source forum path: Game Development Engines > Legacy Engine Support > RPG Maker MV Support
Summary
Hello! I'm rather new to this and still learning javascript, but here goes: I'm using RPGMAKER MV and I need an event to check for the nearest berry bush event and walk to it. This isn't part of a cutscene, just a parallel process once a "Harvest" switch is turned on. Right now, I'm using Yanfly's Move Route Core. The script call: "CRASH MOVE TO: EVENT X" has worked great for manually putting in a specific berry bush. But since the berry bushes are spawned into the map at random...
Archived First Post
I'm using RPGMAKER MV and I need an event to check for the nearest berry bush event and walk to it. This isn't part of a cutscene, just a parallel process once a "Harvest" switch is turned on.
Right now, I'm using Yanfly's Move Route Core. The script call: "CRASH MOVE TO: EVENT X" has worked great for manually putting in a specific berry bush. But since the berry bushes are spawned into the map at random spots, I need the event to be able to find the nearest one and move toward it on its own.
I've also been using CBT_NearestEventMV. It looks like the script call I would need is:
$gameMap.nearestEventId('berrybush', $gameMap.event(this._eventId))But I'm not sure how to put these two together. I can use the script call but then I don't know how to access the Id that it grabbed and put it into the "CRASH MOVE TO:" type command. Is it even possible to combine the two? Or would I need to use some extra js code in addition to CBT's script call.
Thank you in advance!
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...