Main Menu
  • Welcome to The RPG Maker Resource Kit.

[VX REQUEST] Smarter AI

Started by Dissentrix, January 30, 2015, 07:44:25 PM

0 Members and 1 Guest are viewing this topic.

Dissentrix

Hello, this is my first time posting here.  :) I'm making a game in VX where there are several chase scenes. Now, the thing is, when I set the movement route to "approach", the enemies will chase me. But the problem is that if I'm too far away, they start to act really stupid, either not moving at all or getting stuck in walls.
Now, I'm aware of modern algebra's "Path Finding" script (http://rmrk.net/index.php?topic=25952.0) and Yanfly's "Chase event". But the first doesn't allow you to make enemies chase the player, only go to a specific point, and the second is not available for VX. So what I'd like is for someone to get the AI to do a good pathfinding, like in modern algebra's script, AND chase the player.
Thank you very much !

&&&&&&&&&&&&&

http://forums.rpgmakerweb.com/index.php?/topic/3064-pathfinding/

Example of following the player at a distance, either using:

Event's custom move route (on repeat):
  find_path($game_player.x, $game_player.y, 3)
Or set move route command in a loop:
  find_path($game_player.x, $game_player.y, 0, true, 3)


You may also use find_path(x, y) (no ev or wait) inside of an event's
"Set Move Route..." command, using the "Script..." tab. This does the same
as above, but takes on the properties of the move route you are making,
including the affected character.
&&&&&&&&&&&&&&&&

Dissentrix

I tried it and got the following error :
ArgumentError occurred while running script.

wrong number of arguments(3 for 2)

Now I'm a complete noob at scripting, but are you sure Jet's pathfinding is meant for VX ?

&&&&&&&&&&&&&

Wow. I'm an idiot.
I didn't realized it but yeah, that's an VX Ace script. Sorry about that.

Try out Modern's script.
In the custom move route, select script and put this-
find_path($game_player.x, $game_player.y)
&&&&&&&&&&&&&&&&

Dissentrix

This time, I got no error, which is something, but the event also didn't move at all. I'm not sure modern algebra's script handles finding a global variable :(

&&&&&&&&&&&&&

Sorry, I'm good with this stuff.

Maybe Modern Algebra will show up and help.
He does that sometimes.
Or maybe another scripter will show up.
&&&&&&&&&&&&&&&&

Dissentrix

Ok, thanks very much anyway for trying :)