I am trying to make a cool sneaking section in my game, but whenever I hide behind a wall the event sees me. I thought oh look Yanfly already has a stealth plugin. After it downloaded and I put down the stealth regions, I tested it out and now where the guard used to be able to see me behind the wall he just stops in place and won't continue walking until I leave his area where he would be able to see me. If there is a way to fix this that already exists I would be overjoyed to know. Thank you!
Chase event stops when approaching stealth area
Javascript/Plugin SupportA link to the page where the plugin can be found would be helpful so that people don't have to hunt for it.
Screen shots of your regions and how you set his move route with script calls is needed as well as the regions you set to stealth and maybe even the parameters you setup in the plugin. Event Chase Player can be a little buggie sometimes, as simple as it all seems, there is a lot going on in the engine that has to process. Also always make sure the frequency of the event is set to highest.
Alright below are the links to the plugins and the pictures of the problem. Again thank you for your help!
Links
Chase Player: http://yanfly.moe/2015/10/21/yep-20-event-chase-player/
Stealth Chase Player: http://yanfly.moe/2016/03/05/yep-79-event-chase-stealth/
Stealth Areas. 41, and 40
Movement Code for the guard to walk in a circle and chase the player if the player is seen. Inside of the custom move route
Guard stops right here and stops moving along his route as soon as I would enter into his sight range.
Guard continues his route when player moves out of his sight range.
Links
Chase Player: http://yanfly.moe/2015/10/21/yep-20-event-chase-player/
Stealth Chase Player: http://yanfly.moe/2016/03/05/yep-79-event-chase-stealth/
Stealth Areas. 41, and 40
Movement Code for the guard to walk in a circle and chase the player if the player is seen. Inside of the custom move route
Guard continues his route when player moves out of his sight range.
The Plugin parameters
Try putting the script commands before any movement commands in your move route.
Just tried it, and the event still pauses when I'm within his sight
yeah, im having the same problem.
Me too, the plugin said that:
Once the player is detected, Stealth Regions stop applying and the alerted
* event will chase the player (or flee from) even if the player runs into
* another Stealth Region. The Stealth Regions remain disabled until the event
* is no longer chasing (or fleeing from) the player.
but it doesn't work
Once the player is detected, Stealth Regions stop applying and the alerted
* event will chase the player (or flee from) even if the player runs into
* another Stealth Region. The Stealth Regions remain disabled until the event
* is no longer chasing (or fleeing from) the player.
but it doesn't work
I'm glad to know that I am not the only one this is happening too. Just searched the forum threads about this situation and saw this one right away. Maybe it has something to do with the new version + plugin updates? I have tried a bunch of different options to make it work but nothing yet.
Not the same issue but I'm trying the plug-in to trigger enemy encounters on follower touch and it also doesn't work. Maybe these plugins are busted 🙁
Well there was just a sight update to my RPG Maker a week or so back and I don't know what that was exactly. As far as I knew, Yanfly was updating his plugins to work with the new 1.6.1 version so maybe something changed in MV to undo that again. Of course, that is only a theory as I am no program script reader in any way, shape or form. I may try just doing my own event encounter eventing in the meantime in case this isn't a "soon" fix.
Well for dear of plugin plugin not working I'm using 1.51 lol but again I haven't tried your issue.
I made a thing! 👋
If you want to try it, either download the attachment or save the code in the spoiler below as a .js file (you can name it whatever you like). Then import it as a plugin, placing it immediately under YEP_X_EventChaseStealth in the Plugin Manager.
This comes in two parts:
Oh, and on the topic of non-stationary chase events: be warned that if they're set to return to position after chasing/fleeing, they'll return to the position they were in when they started chasing/fleeing, not their original starting position. Their automatic move route, if any, will then restart from the beginning. This may cause unintentional offsets in your guard patrols, etc. Just so you're aware. 😅
If you want to try it, either download the attachment or save the code in the spoiler below as a .js file (you can name it whatever you like). Then import it as a plugin, placing it immediately under YEP_X_EventChaseStealth in the Plugin Manager.
Code:
/*:
* @plugindesc v1.0 - Patches some behaviours in Yanfly's Event Chase Stealth plugin.
* @author Caethyril
*
* @help Place this immediately below YEP_X_EventChaseStealth in the Plugin Manager.
*
* Overrides nonSeePlayer function of YEP_EventChasePlayer (requisite):
* - makes events able to chase you outside their original stealth region.
* Overrides chaseConditions & fleeConditions functions of YEP_EventChaseStealth:
* - prevents events from stopping and staring at you when you're stealthed.
*
* https://forums.rpgmakerweb.com/index.php?threads/chase-event-stops-when-approaching-stealth-area.84308/
*/
// ~*~*~*~*~*~*~*~ YEP_EventChasePlayer stuff ~*~*~*~*~*~*~*~ //
// fix for chasing stopping immediately when going stealthy //
Game_Event.prototype.nonSeePlayer = function() { // Override!
if (Imported.YEP_X_EventChaseStealth) {
if (this._alertLock <= 0 && this.meetStealthModeConditions()) { // added _alertLock check
this.stealthClearChaseSettings();
this._stopCount = 0;
return false;
}
}
return !this._seePlayer;
};
// ~*~*~*~*~*~*~*~*~*~*~ YEP_X_EventChaseStealth stuff ~*~*~*~*~*~*~*~*~*~*~ //
// fix for automatic movement stopping when player is in range but stealthed //
Game_Event.prototype.chaseConditions = function(dis) { // Override!
if (this._alertLock <= 0 && this.meetStealthModeConditions()) { // changed from $gamePlayer.isStealthMode()
this.stealthClearChaseSettings();
return false;
}
return Yanfly.ECS.Game_Event_chaseConditions.call(this, dis);
};
Game_Event.prototype.fleeConditions = function(dis) { // Override!
if (this._alertLock <= 0 && this.meetStealthModeConditions()) { // changed from $gamePlayer.isStealthMode()
this.stealthClearChaseSettings();
return false;
}
return Yanfly.ECS.Game_Event_fleeConditions.call(this, dis);
};
// ~*~*~*~*~*~*~*~*~*~ end ~*~*~*~*~*~*~*~*~*~ //
- First part to fix stealth causing chasing/fleeing events to stop immediately. Events should now continue chasing stealthy-you for a bit.
- Second part to fix the halting movement for events that could chase you if only you weren't in a different stealth region.
Oh, and on the topic of non-stationary chase events: be warned that if they're set to return to position after chasing/fleeing, they'll return to the position they were in when they started chasing/fleeing, not their original starting position. Their automatic move route, if any, will then restart from the beginning. This may cause unintentional offsets in your guard patrols, etc. Just so you're aware. 😅
Hey thanks for doing that Caethyril! I already went ahead and did something else for my current map, but I do have plans for the stealth plugin so I'll gladly look into and test your fix you made. I'm not sure if @Yanfly is aware of the issue or not and his profile is private here so I'm not sure how one could let him know about this bug. He may already know and be working on a patch up, but know knows? He probably has a lot on the go and a solo guy can only do so much in a day, right?
You're my hero, Caethyril
Seriously though, thank you, I'd been trying to find a workaround for this for 2 days with no luck
Seriously though, thank you, I'd been trying to find a workaround for this for 2 days with no luck
Yes, I'm not sure what the Yanfly team are occupied with at the moment...maybe Pixel Maker MV? Thanks to all the spam Yanfly have received through other channels, I think the optimal means of contacting them is through Patreon, but I'm not a patron at present. Maybe someone who is will see this and pass it on.
That said, it seems like a pretty old issue (2016) so I'm surprised I managed to solve it...I keep expecting someone to say it doesn't work. 😅
Took me a while to get there, too, but worth it. 😮💨 You're welcome! 🙏
I don't know how many people actually get around to using plugins like the chase event ones. I'm sure lots use the skill cores and battle plugins, but maybe ones like this don't get issues reported because only a handful actually fins this one useful? That's only a guess though. Maybe no one thought it was working incorrectly for their setup.
YOU ARE AMAZING! THANK YOU! This totally fixed my map!
bazrat, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.
Since the issue is solved, I'm closing this.
Original thread: https://forums.rpgmakerweb.com/threads/chase-event-stops-when-approaching-stealth-area.84308/