MV Trigger something when no movement after set period of time

Hi there!
So this request comes up because I was trying to make something happen with the Yanfly Event Chase Player plugin.


Basically, I'm using this for enemy chase, which already has the enemy/event call for balloon icon when spotting the player.
However, I wanted to make it use a separate balloon icon when 'losing' the player.
The plugin allows you to set a time before it will start returning to it's spot. And it's then, after that many frames, I want to call for a separate balloon icon, like say my Question mark one or so.

I've also tried using this script
this.character().isMoving();
But really wasn't able to get it to work proper.

[In summery, event sees a player and it does chase and summon the exclamation. However, I can't seem to figure out how to make it bring forth the question mark once it loses the player.]

Thank you!
Moved to: Plugin Support
Just a quick bump to see if anyone has any input here 🙂 I tried a few more things but again had little success.
Hello,

There is a more polished way to do this. But try editing Yanfly's plugin to the below.

JavaScript:
Game_Event.prototype.startReturnPhase = function() { 
    if (!this._returnAfter) return;

    this.requestBalloon(2); //This is the line you are adding.
    //#2 is the default Question Mark image

    this._returnPhase = true;
    this._returnFrames = this._returnWait;
};

Note, that this would have a question mark for all events set to return to their position. (Using 11 instead of 2 should get you no balloon, with the default "Balloon.png" file)

If that achieves the effect that you want, then you may want to add a property to the Game_Event, and set the default to question mark, or nothing. Then have the above code read that property instead of hard-coding to 2. You could then set that property just like you do the chaseRange or the alertBalloon. That would give you the ability to make them sleepy, angry, or sad when they have lost the player. Hope it helps.
You ever have something you toy with for hours, get no result, and when you finally get the courage to ask for help someone has a really simple answer to do it?

That just happened!
Autodidact? Thank you. Truly thank you so much, that did it! Amazing~ Have a lovely day!

(This topic can be closed now too ^^ )

Original thread: https://forums.rpgmakerweb.com/threads/trigger-something-when-no-movement-after-set-period-of-time.143587/