[VX REQUEST] Smarter AI

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 28
RMRK Junior
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 !

*
i am satin die lol
Rep:
Level 96
welcom to hel
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
http://forums.rpgmakerweb.com/index.php?/topic/3064-pathfinding/

Code: [Select]
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.

**
Rep: +0/-0Level 28
RMRK Junior
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 ?

*
i am satin die lol
Rep:
Level 96
welcom to hel
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
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-
Code: [Select]
find_path($game_player.x, $game_player.y)

**
Rep: +0/-0Level 28
RMRK Junior
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 :(

*
i am satin die lol
Rep:
Level 96
welcom to hel
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
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.

**
Rep: +0/-0Level 28
RMRK Junior
Ok, thanks very much anyway for trying :)