GET STEPS FOR PATHFINDING
#1
GET STEPS FOR PATHFINDING
Version: 1.0


Introduction
If anyone used Near Fantastica's Pathfinding system, they may have noticed that the 'Wait Till Move Completion' event had no effect. You could try to figure out some arbitrary wait time from when a character was to move from point A to point B, but you were usually just guessing.... until now.

This little add-on for Near Fantastica's original pathfinding script will obtain how many steps that was calculated by the system. Using that, you can make some sort of wait count system based on the actual steps taken!

Again, this is for Near Fantastica's version 1 pathfinding script found HERE


Script
The Script

Instructions
Insert this script below Near Fantastica's original.

In an event code, you can create something like this:
Code:
@>Script:  $game_player.find_path(4,3)
@>Wait: 1 frame(s)
@>Script:  $game_variables[9] =
:      :  $game_player.get_path_steps
@loop
  @>Conditional Branch: Variable [0009] <= 0
    @>Break Loop
    @>
  : Branch End
  @>Wait 3 frame(s)
  @>Control Variables: [0009] -= 1
  @>
: Repeat Above

Might be a little odd, but I made a loop that counted down from the recently acquired steps. Each time it looped, it waited 3 frames until the counter ran out. During that time, my character ran from wherever he was until map coordinate (4/3).

A simpler way would be if you made a WAIT method that could just input the delay as WAIT(variable in frames) Tongue sticking out


Compatibility
For RMXP and version 1 of Near's Pathfinding.


Credits and Thanks
Near Fantastica of course.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }




Users browsing this thread: 2 Guest(s)