• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Small Pathfinder. No more manual move-routes necessary!

320
Posts
13
Years
  • Seen Dec 27, 2021
I've made a modified version of pbMoveTowardPlayer, which allows an event to move towards another event instead of the player ( handy for cutscenes etc where positions are dynamic ).

Here is the script, place it somewhere above main:

Spoiler:

The script can be used in an event like this:

Code:
pbMoveTowardEvent(:Distraction, :Oak)

Where :Distraction and :Redwood are the names of the respective events ( case insensitive ).

Or to move to a specified position instead:

Code:
pbMoveTowardPosition(:Distraction, 24, 15)

Where :Distraction is the event's name, 24 is the X, and 15 is the Y.


Hope this is useful for some of you :)
If you find any bugs or have a suggestion, please let me know.
 
Last edited:
35
Posts
6
Years
  • Age 36
  • Seen Nov 1, 2018
Tested works okay. Some few things I found.

1. When the destination event is too far on the same map ( which you won't see if it is reaching the target),
it waits like forever to move as if waiting for the event to finish but the game won't freeze as all animation in the map still moving.

2. When blocked by moving event the game freezes and restarts.

3. When the destination has wide obstacle in front, it just stay in the obstacle and not finding its way around on the target.

Overall it is working good. Thanks for this beautiful script.
 
320
Posts
13
Years
  • Seen Dec 27, 2021
Tested works okay. Some few things I found.

1. When the destination event is too far on the same map ( which you won't see if it is reaching the target),
it waits like forever to move as if waiting for the event to finish but the game won't freeze as all animation in the map still moving.

2. When blocked by moving event the game freezes and restarts.

3. When the destination has wide obstacle in front, it just stay in the obstacle and not finding its way around on the target.

Overall it is working good. Thanks for this beautiful script.

Thanks for the feedback.
I know it's a late response on my end but I'll be updating the script this week with fixes for these issues.
 
320
Posts
13
Years
  • Seen Dec 27, 2021
This could be really useful! Have the bugs mentioned by Jazerules been fixed?

Few months later and I still haven't fixed them :3c
That's mostly cause this was intended as a really simple script, and I myself use it 90% for movement in indoor cutscenes. In situations like that it works perfectly fine.

I did at one point have another pathfinder script based on an A* pathfinder edited to work with essentials which is much more useful for the problems described by Jazerules: dealing with obstacles, long distances etc. I'm going search my PC to see if I still got the script and if so I intend to release it here since I've picked up fangame development again.
 
Back
Top