Chase event stops when approaching stealth area

Status
Not open for further replies.

Shadowy_Darkness

Villager
Member
Joined
Sep 23, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
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!
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,297
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
A link to the page where the plugin can be found would be helpful so that people don't have to hunt for it.
 

OnslaughtSupply

Ssshhh...
Veteran
Joined
May 14, 2017
Messages
731
Reaction score
764
First Language
English
Primarily Uses
RMMV
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.
 

Shadowy_Darkness

Villager
Member
Joined
Sep 23, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
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
Capture.PNG
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

Capture2.PNG Guard stops right here and stops moving along his route as soon as I would enter into his sight range.
Capture3.PNG
Guard continues his route when player moves out of his sight range.
Capture4.PNG
 

OnslaughtSupply

Ssshhh...
Veteran
Joined
May 14, 2017
Messages
731
Reaction score
764
First Language
English
Primarily Uses
RMMV
Try putting the script commands before any movement commands in your move route.
 

Shadowy_Darkness

Villager
Member
Joined
Sep 23, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
Just tried it, and the event still pauses when I'm within his sight
 

Nova-Games

Warper
Member
Joined
Apr 27, 2017
Messages
2
Reaction score
2
First Language
Norwegian
Primarily Uses
RMMV
yeah, im having the same problem.
 

Keegan

Villager
Member
Joined
Jan 14, 2018
Messages
9
Reaction score
3
First Language
Indonesian
Primarily Uses
RMMV
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
 

IguanaGuy

Developing I.C.B.M. :Unleashed!
Veteran
Joined
Mar 26, 2016
Messages
158
Reaction score
689
First Language
English
Primarily Uses
RMMV
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.
 

Icenick

Veteran
Veteran
Joined
Mar 28, 2012
Messages
410
Reaction score
60
First Language
English
Primarily Uses
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 :(
 

IguanaGuy

Developing I.C.B.M. :Unleashed!
Veteran
Joined
Mar 26, 2016
Messages
158
Reaction score
689
First Language
English
Primarily Uses
RMMV
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.
 

Icenick

Veteran
Veteran
Joined
Mar 28, 2012
Messages
410
Reaction score
60
First Language
English
Primarily Uses
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.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,058
Reaction score
1,483
First Language
EN
Primarily Uses
RMMZ
I made a thing! :kaohi:

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 ~*~*~*~*~*~*~*~*~*~ //
This comes in two parts:
  • 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.
I only did a few quick tests, so let me know whether it works for you. :kaothx:

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. :kaoswt:
 

Attachments

Last edited:

IguanaGuy

Developing I.C.B.M. :Unleashed!
Veteran
Joined
Mar 26, 2016
Messages
158
Reaction score
689
First Language
English
Primarily Uses
RMMV
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?
 

Junol

Glitchdev
Member
Joined
May 17, 2018
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
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
 
Last edited:

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,058
Reaction score
1,483
First Language
EN
Primarily Uses
RMMZ
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?
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 *******, 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. :kaoswt2:

Seriously though, thank you, I'd been trying to find a workaround for this for 2 days with no luck
Took me a while to get there, too, but worth it. :kaophew: You're welcome! :kaothx:
 

IguanaGuy

Developing I.C.B.M. :Unleashed!
Veteran
Joined
Mar 26, 2016
Messages
158
Reaction score
689
First Language
English
Primarily Uses
RMMV
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.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,803
Reaction score
5,212
First Language
Dutch
Primarily Uses
RMXP

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.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

So I'm practicing ITC with a spirit box, and decide to try to contact my deceased soulmate. It actually gave me multiple identifiers. Me, still a bit skeptical, asked aloud "Fine but does he still love me?" and the box spoke and printed the word "Forever" at the same time. Been a mess of tears since. :kaocry:
Been scratching away at my game and making progress, but just had a revelation. I'm working in full screen and adjusting all my pictures accordingly, but will they resize if someone's screen is smaller?? I hope this doesn't turn out to be a problem later.
Why is there so much month left at the end of money? D=
Hello humans! How goes your day in this journey of living? I hope it is good, for I am human like you, and I am feeling great! Worship the altar.

Forum statistics

Threads
105,630
Messages
1,015,092
Members
137,290
Latest member
LilleB
Top