Path Finding - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Material Development (https://www.save-point.org/forum-8.html) +--- Forum: Scripts Database (https://www.save-point.org/forum-39.html) +---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html) +---- Thread: Path Finding (/thread-2774.html) |
Path Finding - Near Fantastica - 03-02-2008 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 BONUS Version: 1 The original version at the bottom of the post! Introduction "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. Demo Both v1 and the new v2 beta in one set It's about time... Script 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 Instructions 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. Syntax Event Pathfinding Player Pathfinding Try this... "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 BONUS!
Version 1.0 Introduction 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. Script Path Finding (The Original) Instructions Fairly simple.
|