What I am trying to do is set up enemies that patrol an area. If they spot the player they go towards them for a set distance then stop and return to where they were. If they touch the player a battle will start. I went through various plugins trying to figure it out. The ones I tried so far are yanfly's event chase and galv's plugin. I can get events to chase as long as they are in a fixed spot, but as soon as I try to have them move the event stops working or they immediately chase the player upon starting the map level. I think one of my issues might just be a lack of understanding how to code and order the events, but I can't find examples to learn from. I would greatly appreciate any help through this as I spent a few days on this and no luck.
MV On map encounters that patrol the area
JS Plugin RequestsDo you have YEP_EventChasePlayer?
That's one of the plugins I mentioned using. It works fine if the event is stationary, but I can't figure out how to make it work if they are moving from the start.
Ah sorry. I dunno how to help then.
I'd recommend using galv's eventdetectors, as it also features ways to have walls actually interrupt line of sight.
The plugin allows for very specific actions of the moveroute, although I'm not entirely sure if you can program it to return to the fixed patrol route on sight loss, as I never needed it myself, but I'd guess it's possible.
The plugin allows for very specific actions of the moveroute, although I'm not entirely sure if you can program it to return to the fixed patrol route on sight loss, as I never needed it myself, but I'd guess it's possible.
To be clear: the event is moving along a fixed route, and you want it to leave the route to chase the player if the player is within a range of <=a tiles of it, then go back to its position in the route when the player is >a distance from it?
Because that would be fairly difficult.
That said, you can do this with MOG Event Sensor or pure scripting. The hard part is going back to where it was in the patrol route and continuing the patrol.
Also it sounds like you want the event restricted to a fixed area on the map and can't leave the area?
Because that would be fairly difficult.
That said, you can do this with MOG Event Sensor or pure scripting. The hard part is going back to where it was in the patrol route and continuing the patrol.
Also it sounds like you want the event restricted to a fixed area on the map and can't leave the area?
That's one of the plugins that I am looking at. It works fine if the event is fixed in place, but I can't figure out how to make it move in a set route and go towards the player if spotted. When I try to it automatically goes towards the player. I took a look at the demo provided to get a better idea, but all the events in it are also stationary until they detect the player.
Have you tried to set the events movement to patrol and put YEP_EventChasePlayer in a movement command with the event set to parallel? Not sure if that would work.
I thought I tried everything I could think of but I finally figured out a way to do it!
You'll have to put the route in the autonomous moveroute for it to work.:
Would you mind sharing? Future generations may be having this problem. You wouldn't want them to be frustrated with their lack of answers.
Original thread: https://forums.rpgmakerweb.com/threads/on-map-encounters-that-patrol-the-area.170420/