• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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
    15
    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:
    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.
     
    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.
     
    This could be really useful! Have the bugs mentioned by Jazerules been fixed?
     
    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