Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Path Finding
Path Finding
Version: 2
by Jaime 'Near Fantastica' Webster
Not DerVVulfman

and Version: 2 beta
Event Start & Option_Close option Correction
Minor Edit By DerVVulfman

Version: 1
The original version at the bottom of the post!

"NO MORE CUSTOM MOVEMENTS! This script uses path finding to return the shortest path from the START XY to the END XY then uses the custom movement to move the character(s). You can chain this path finds together to path link between 2 points or more...

As well an Error message will be displayed if you try to send an event to a place it can not get to. 'Target Is Unreachable for Event ID' " - Near Fantastica

By the poster
I didn't create the script, and as of now the links that Near Fantastica put up are down (and he can't get to them) and his RMXP system is down. Given that he posted the original (though broken) demo links here, there should be no problem to post the script.

However as I didn't create the script, I cannot offer support.

Both v1 and the new v2 beta in one set
It's about time...

Path Finding v2

Good as it is, it had an error with the system that started to move 'events' on the map. Also, a feature added by Fuso (the option_close feature) was 'accidentally' removed in version 2. These have been remedied in the version below, and I added a new feature to change the estimated pathfinding range (explained in script & demo):
Path Finding v2 beta

You need to setup a movement event before you can add a path or commands this is done with the $path_finding.setup_event or $path_finding.setup_player command then you can add a command or a path this is done by $path_finding.add_command or $path_finding.add_paths (or appropriate for players movement) commands. Now you can add as many commands and paths as you want to event by adding more of these. This is called path linking. Then when you are ready to start the movement use $path_finding.start_event or $path_finding.start_player.

Now this can be done in 2 places in the events command window or in the custom movement of an event. If you do it in the movement window to start use this
return $path_finding.start_event(index) or the code will not work right.

As well I found out something interesting if you have a repeating movement event using this movement with a defined wait the wait will repeat everytime, but if you add a normal move event wait it will only operate once. This can be a good things to add this delay so not all the events start at once yet do not repeat that wait later.

Event Pathfinding
Player Pathfinding

Try this...
Credits and Thanks
"Fuso made the main part of this script all I did was make it work. Fuso needs as much credit or more then I do for this script." - Near Fantastica

Version 1.0

I somehow found an old 'abandoned' site that had this version... prior to any SDK edit! This is the original!?? And as a bonus, this script doesn't conflict with version 2!

Why do you ask? This system allows you to move to a map event's space and stop right at the event. In the version 2 system, attempting to move to a space occupied by a map event results in a 'Cannot move to...' prompt/flag. This one still moves to the spot. Good if you plan to make a mouse/pathfinding combo.

Path Finding (The Original)

Fairly simple.
  1. You use $game_player.find_path(x,y) to move the player to a spot on the map.
  2. Or you can use self.event.find_path(x,y) to move an event to a spot on the map.
  3. Finally, you can use self.find_path(x,y) for a movement script call to do the same.
Reply }
Hey, ported version 1 over to VX and Ace.

Near Fantastica's Path Finder v1 for RMVX
Near Fantastica's Path Finder v1 for RMVXA
Reply }

Possibly Related Threads…
Thread Author Replies Views Last Post
   RTP Path Grimimi 2 5,331 09-03-2012, 04:53 AM
Last Post: Grimimi

Users browsing this thread: