[RMXP] CHASE SCENES

Posts

Pages: 1
I'm trying to implement chase scenes done by monsters who aren't, well, dumb and get stuck wherever they go, or stop to smell the roses at some point for no apparent reason. The RMXP "Approach" function can't do it, so I'm trying to use a pathfinding script but I don't know how to let it approach a player that is constantly moving. Help would be appreciated!

Pathfinding script I'm using: http://forum.chaos-project.com/index.php?topic=9784.0
SunflowerGames
The most beautiful user on RMN!
13323

Are you talking about enemies that are off screen not moving? ie. you get in an encounter when you touch an enemy, but enemies that are not on screen are not moving.
No, just that enemies which I set to "approach" keep doing silly things like getting stuck between tables and all that. I'm using Blizzard's pathfinding script now, but the enemy still gets stuck.
I personally prefer using the move route command "Move toward player" over "Approach."

I've never thought of using a pathfinder to do a chase scene. It seems like you'd have to track the players x and y coordinates and then set the pathfinder on the chasing event to follow those variables. I'm not sure if that's possible in Blizzard's script, but it doesn't look like it is in the pathfinder I use (Forever Zer0's).

There's also a script for chase scenes, here. Though I haven't tested it out.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
This is what a pathfinding script is supposed to prevent. It sounds like your pathfinding script kinda sucks! Oh well. Here's a workaround.

Loop the following:
1) record monster x/y coordinate in variables
2) move one step toward player (or better yet, move one step according to pathfinding script!)
3) record monster x/y coordinate in a second set of variables
4) if x/y coordinate in step 3 is the same as it was in step 1, move in a random direction 3-6 times (I recommend picking a random number between 3 and 6 each time. Note that some of the random movements will usually be wasted as it tries to walk into walls.)
5) start over at step 1

Now if it gets stuck it will wiggle around at random instead of staying in one spot. It will eventually get out most of the time... or at least more often than it did before. Not perfect, but it should be an improvement.
I'm much prefer to use ''set move route'' command and set enemy as ''approach'' to player, rather than scripts since some scripts can cause lag & sounds complicated.

My only key to avoid the enemy get stuck or stopped is depend on the map @ place where you want the chase event takes place. Avoid put lots of objects (especially on the middle floor) at that place to reduce the tendency of enemy to get stuck.
author=mightydarkchocolate
My only key to avoid the enemy get stuck or stopped is depend on the map @ place where you want the chase event takes place. Avoid put lots of objects (especially on the middle floor) at that place to reduce the tendency of enemy to get stuck.

But that takes away so much of the challenge for the player! D:

I have a chase scene that takes place in an obstacle course.
What I did to keep the enemy moving was set up a parallel process event that checks the enemy's location (using variables), and using a bunch of conditional branches, I've set up some move route commands when the enemy is faced with an obstacle so that he will be able to walk around/jump over it or whatever.

While it's still possible for the enemy to get stuck, it's highly unlikely.
Pages: 1