Better Autonomous Movement "Approach" ?

Discussion in 'RPG Maker MV' started by Soulrender, Aug 6, 2019.

  1. Soulrender

    Soulrender Veteran Veteran

    Messages:
    149
    Likes Received:
    78
    First Language:
    Poland
    Primarily Uses:
    RMMV
    In one of my maps some enemies movement is set to "Approach" and from technical point there is nothing
    to complain, except one thing that this movement "Approach" is kinda ... Irrational - Events often likes to block on
    obstacles.

    So my question is, how you handle "approach" movement that is actually "smart"?
     
    #1
  2. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    659
    Likes Received:
    231
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    I know there is the Yanfly Move route, that has this feature you want.
    Also you can use a script call inside move route:
    this.moveStraight(gamePlayer.x, gamePlayer.y)

    But I don't remember if this command make it smart, or just remove the random movements from approach.
     
    #2
    Soulrender likes this.
  3. Soulrender

    Soulrender Veteran Veteran

    Messages:
    149
    Likes Received:
    78
    First Language:
    Poland
    Primarily Uses:
    RMMV
    I'll give it a try :) Thanks :)

    Edit: Well... It's better, but still not quite what I expect.
     
    Last edited: Aug 6, 2019
    #3
    Eliaquim likes this.
  4. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    659
    Likes Received:
    231
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Yes!
    I think by default Rm Mv not have this smart feature. Maybe you should try the plugin from yanfly.
    Also, I think Quoxios has one too.
    The Shaz one I never used.
     
    #4
  5. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,278
    Likes Received:
    4,797
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Use Shaz's https://forums.rpgmakerweb.com/index.php?threads/smart-pathfinding.46761/
    Then add
    Code:
    Game_Character.prototype.searchLimit = function() {
         return 999; 
    };
    The reason why it isn't that "smart" is that there is a limit on how far the search is going to be. Uncapping the limit may make the search smarter but also being a burden to your game when it's too far,
     
    #5
    Wavelength and Soulrender like this.
  6. Soulrender

    Soulrender Veteran Veteran

    Messages:
    149
    Likes Received:
    78
    First Language:
    Poland
    Primarily Uses:
    RMMV
    Oh. I didn't know that, thank you Theo. Anyway thank you all. :)
     
    #6

Share This Page