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 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:
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!
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!
I've plugged each of these solutions in and haven't had any luck yet, but I'm going to revisit this after I've had some shut eye. I'm sure I'm slipping up somewhere.
