Jump to content


Khas Pathfinder

khas engine

  • Please log in to reply
8 replies to this topic

#1 Khas


    Awesome Coder

  • Member
  • 33 posts
  • LocationBrazil
  • RM Skill - Coder

Posted 28 February 2012 - 12:27 PM

Khas Pathfinder
by Khas Arcthunder

- Introduction
Do you need some awesome tools? Check this one, a pathfinder! This script calculates the shortest route between two points, and it also moves any Game_Character objects with the found path.

- Features:
Smart pathfinding
Fast Algorithm
Easy to use
Game_Character objects compatible
Log tool

- How to use:
All the instructions are on the Pathfinder demo.
Please read them carefully.

- Links:
Terms of Use: English – Read before use
Download: English – Latest Version

- Credits:
Created by Khas Arcthunder

Edited by Khas, 11 September 2012 - 08:31 AM.

Posted Image

#2 regendo


    Ruler of Worlds

  • Member
  • 893 posts
  • LocationGermany
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 18 March 2012 - 01:34 PM

Woah! No-one commented on this or even liked it? The world must've finally turned completely mad!
Good job on this one. I haven't tried it out yet, but if it works fine (which I assume it to do), there will be lots of people using this script.
The most recent versions of my scripts and my ToU are on github! - /regendo

#3 Darren Destiny

Darren Destiny

    Arch Mage

  • Member
  • 10 posts
  • LocationDover
  • RM Skill - Jack of All Trades

Posted 20 March 2012 - 09:30 AM

Yeah I agree with regendo, I have no idea why this is not popular, this is awesome and it should stop and path finding errors if something gets in the way + its really simple to, i'm probably going to use this in a project of mine

#4 billy blansett

billy blansett


  • Member
  • 9 posts

Posted 20 March 2012 - 10:34 PM

nice script and demo. but i cant read it to understand how to use it.

#5 Dark Horseman

Dark Horseman


  • Member
  • 325 posts
  • RM Skill - Artist

Posted 11 April 2012 - 07:22 PM

Khas, the "find_path(-1,10,10,true)" to indicate wait for movement to complete doesn't appear to work. It treats the move as a parallel process whether or not I indicate nothing, false, or true.

That being said, thank god you made this script. There is nothing else out there, and this seems pretty damned important for games where you can't predict where objects are.

Billy, make an event (player touch event is easiest to get a feel for it), go to tab 3, and click Advanced - Script. Then just paste this in:


This makes your player move to coordinate x,y. So find_path(-1,21,10) moves the player to 21,10.

If you have an NPC with ID:004, use:


To send the NPC to 21,10.

Edited by Jamaz, 11 April 2012 - 07:25 PM.

#6 Khas


    Awesome Coder

  • Member
  • 33 posts
  • LocationBrazil
  • RM Skill - Coder

Posted 20 April 2012 - 06:05 PM

Thanks people :D

@Dark Horseman
Have you tried the demo? Does the player wait until the movement is complete, doen't he?
I'm sure that this function is working, can you test again please?
Thanks ^^

Posted Image

#7 Dark Horseman

Dark Horseman


  • Member
  • 325 posts
  • RM Skill - Artist

Posted 20 April 2012 - 08:47 PM

The script does prevent any user input from occurring while moving, but events still override the script. An example is I want to run an event once the player reaches the destination. Any event after the script find_path(-1,x,y,true) instead occurs immediately.

Posted Image

(9,3) is to the left of the player. However, the player immediately moves right 2x instead and stops. Or I want the player to reach the end and then have a text box, but the text box comes up right away. It's very minor and I've made a work around by calling a new event on the spot as a new player touch, but it starts to get difficult if I'm making other events move around and watch them. Then I have to try to time everything exactly and put in a wait x frames after the script.

#8 BMoz1


    Advanced Member

  • Member
  • 38 posts

Posted 07 October 2012 - 05:02 PM

How do I make it so an event, not the player, moves to that spot?

Edit: Nvm I figured it out, but now i don't know how to get the event to follow me.
I need a good chaser here.

Edited by BMoz1, 07 October 2012 - 05:11 PM.

#9 pleasehelpme69



  • Member
  • 25 posts

Posted 18 May 2015 - 10:57 PM

Hey Khas,


I am having a similar problem to Dark Horseman did (3 years ago, now). The 'wait' command doesn't appear to be working.


I have an event with "find_path(0,4,11,true)". After the event has moved to 4,11 a self-switch is meant to turn on, changing the event page to one without a graphic (to give the appearance that the event disappeared).


However, the event disappears instantly upon being triggered - before it can move to 4,11.


Is there a fix for this? 


- In saying that, it's still an awesome script and really helpful (among some of your others) to have in my project, so thanks!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users