Stalker/Weeping Angel NPC move route

DShroom

Villager
Member
Joined
Mar 29, 2014
Messages
24
Reaction score
6
First Language
English
Primarily Uses
Hello everyone

Got myself into a bit of a pickle I suppose.

I'm wanting to make an NPC in the game I'm building follow the player BUT only when the player is facing and moving to the left (and is in front/positioned further left than the NPC). When the player faces/moves right, up or down the NPC will stop in their tracks, turn semi-transparent and be a THROUGH set object so the player can pass through them. Bit like Boo from Mario I suppose, all the Weeping Angels of Dr Who.

IF this proves too complicated or time consuming (since it is only for a small segment, but a segment I REALLY would like to have, be cool to use for enemies later in the game too), is there a way to set it so it is impossible for the player to move to their right at all? They can turn to face their right but not move in that direction, only left, up or down.

I've already taken a stab at trying to achieve this with conditional branches but to no avail.

Additionally is there any way to have an NPC's speed steadily increase if set to a 'Move toward player' motion?

Many thanks!
 
Last edited by a moderator:

somuchrainbow

Veteran
Veteran
Joined
Apr 23, 2014
Messages
30
Reaction score
8
First Language
English
Primarily Uses
Sounds like you need a script for this. I think I know which one might work...

Will report back once I find it!

*EDIT*

I found these:

Galv's move route extras

Stealth System

Tsukihime's Event Followers

They aren't EXACTLY what you requested, but maybe you could rig them up to make something similar to what you need.

-Rainbow
 
Last edited by a moderator:

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,533
Reaction score
4,985
First Language
English
Primarily Uses
RMVXA
I would use Hime's Event Page Conditions Script and using script calls like $game_player.direction == 4 for a page.  You'll need a few different conditions for a single page.  Don't use Move Route commands; just do the appropriate default Move Route for each page of the event.

If you're having trouble figuring out the right conditions, I can probably help you further.
 

DShroom

Villager
Member
Joined
Mar 29, 2014
Messages
24
Reaction score
6
First Language
English
Primarily Uses
Hi Wavelength, thanks for the link.

I am having a little bit of a pickle trying to figure out a series of conditions. What would you suggest?
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,533
Reaction score
4,985
First Language
English
Primarily Uses
RMVXA
Okay.  I assume you're familiar with how event pages work in general, when there are multiple pages in an event?

Let me know exactly (from a front-end gameplay point of view (e.g. "player is facing left" or "player is facing away from the ghost")) what you want the conditions to be for each page, and I'll give you the set of conditional branch commands you'll need to make it work.
 
Last edited by a moderator:

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
351
First Language
English
Primarily Uses
RMMV
Here's a way you can do it without any scripts.

Create an event with the graphic of the monster/stalker/whatever, and make it a parallel process. Set its options to "through." I'm assuming that, if the monster catches the player (by moving onto the same square), something bad happens. So create 4 variables - PlayerX, PlayerY, StalkerX, StalkerY. Set them to Player's Map X, Player's Map Y, Stalker's Map X, and Stalker's Map Y. Then make a series of conditional branches: "PlayerX == StalkerX," then within that, "PlayerY == StalkerY," then within that, "Player is facing Left." Then do whatever happens if they're caught. You don't need any else statements for any of those, so just close them out.

After that, put another conditional branch, "Player is facing Left." Within that conditional branch, add, "PlayerX < StalkerX." Create a 5th variable and call it StepCount, which will keep track of how many steps the stalker has taken. Add 1 to StepCount here, and make a move route for the stalker event, with "wait for completion" checked, that sets opacity to 255 and moves towards the player. Then do another conditional branch for your StepCount. Let's say, every 3 steps, you want the stalker to move one speed setting faster. So you'll do conditional branch: "StepCount == 3," then you'll do a move route that changes the event's speed to 4 (or whatever). Then, in the else, you'd do "StepCount == 6," and make it even faster. Do this for however much you want the movement to change.

Under the else statement for your "PlayerX < StalkerX" branch, do a move route that sets the event's opacity to 125 (half) and its speed back to its starting setting, then set your variable StepCount back to 0. Add a wait 5 frames here, because otherwise the event will be processed too frequently when it's not chasing the player.

In the last else statement, add the same thing you had in the previous else statement.

Here's a picture of what it will all look like:



And here's a video of it just to make sure this is the sort of thing you wanted:
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I think I've got my hero designs pretty much finialised ( still got some tweaks. ) In the end it'll be the four outfit colour variants with four different skintones.

I'm a bit conflicted. One the one hand, it's quite visually cool to make bodies of water that the player can interact with by going into it. However obscuring the player character from a gameplay perspective is pretty bad. Hmm... There's the option to make the area around the player visible, but then that kind of defeats the purpose of submerging them. :unsure:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
Another two plugins done! One being an on map grid inventory.
busy with my newborn child, can't even touch pc at all ;_;

Forum statistics

Threads
104,295
Messages
1,005,349
Members
135,811
Latest member
napax
Top