Better Autonomous Movement "Approach" ?

Soulrender

Veteran
Veteran
Joined
Jan 12, 2019
Messages
423
Reaction score
245
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"?
 

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
1,291
Reaction score
545
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.
 

Soulrender

Veteran
Veteran
Joined
Jan 12, 2019
Messages
423
Reaction score
245
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:

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
1,291
Reaction score
545
First Language
Portuguese - Br
Primarily Uses
RMMV
I'll give it a try :) Thanks :)

Edit: Well... It's better, but still not quite what I expect.
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.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,140
Reaction score
5,753
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,
 

Soulrender

Veteran
Veteran
Joined
Jan 12, 2019
Messages
423
Reaction score
245
First Language
Poland
Primarily Uses
RMMV

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

If you had some musical requests in line with me.. feel free to re post! Corona has killed me and have recently got my internet back <3
I'm now working on procedural generated World Maps for my own project.
Is there anyone who's interested in having this Plugin for his own game?
I have a dream where RMer are not blinded and too dependant on published script / plugins...
RM MV ACE? 2020? Super? Legends? Sword and Shield? 2.5D? RM Pixel? RM 2: Revenge of Squared RTP tiles? Don't mind me, I'm just wondering about what will be the name of the next engine.


So I came up with a new look for the paths, and along the way realized health bars are so overrated, so now a crazy red light trail follows her and gets shorter as her life decreases. :LZSexcite:

Forum statistics

Threads
98,211
Messages
950,359
Members
129,507
Latest member
ghost01zx
Top