Yanfly Event Chase Stealth help with conditional branch

Hello!

This is short and simple. I just am unsure how to UTILIZE the tools at my disposal in the correct way.

Basically, I want to allow the player to STEAL from NPC's when under the influence of 'stealth'. So I want to create a conditional branch that if you speak to the NPC while in stealth, you will be given the option to steal.

Now, the plugin it self says I can use $gamePlayer.isStealthMode() to check the true/false value in a conditional branch script field. I tried typing in = true or putting true between the () but neither worked.


If anyone can tell me exactly how I might pull this off (or, if I am just bat crazy and i actually CAN'T as is), that would be super helpful! Thank you!
I would assume it's because you put = instead of == or ===, you might not even need an equal sign at all as if it's a Boolean true or false you can just put $gamePlayer.isStealthMode() or !$gamePlayer.isStealthMode() in the conditional branch script.
I would assume it's because you put = instead of == or ===, you might not even need an equal sign at all as if it's a Boolean true or false you can just put $gamePlayer.isStealthMode() or !$gamePlayer.isStealthMode() in the conditional branch script.

I tried with the ==, by itself, and with the !

With the ! at the start, it will activate as though it is true. Whether I am in stealth mode or not. All the other ones will activate the ELSE case.
I tried with the ==, by itself, and with the !

With the ! at the start, it will activate as though it is true. Whether I am in stealth mode or not. All the other ones will activate the ELSE case.

Well the ! should be active if not in stealth, rest if you are, the only code that runs is
Code:
Game_Player.prototype.initEventChaseStealth = function() {
    this._chaseStealthTimer = 0;
    this._chaseStealthPerm = false;
    this._disableStealthDash = Yanfly.Param.ECSStealthDash;
    this._stealthMoveSpeed = Yanfly.Param.ECSMoveSpeed;
};

Game_Player.prototype.isStealthMode = function() {
    if (this._chaseStealthTimer === undefined) this.initEventChaseStealth();
    if (this._chaseStealthTimer > 0) return true;
    return this._chaseStealthPerm;
};

Which will only ever return true if stealth timer is > 0, so I guess you could also do
Code:
$gamePlayer._chaseStealthTimer > 0;

EDIT:
Actually maybe the problem is it removes stealth whenever you trigger things? Maybe you could remove this from the code.
Code:
Yanfly.ECS.Game_Player_triggerAction = Game_Player.prototype.triggerAction;
Game_Player.prototype.triggerAction = function() {
    var value = Yanfly.ECS.Game_Player_triggerAction.call(this);
    if (value) this.setStealthMode(false);
    return value;
};

Yanfly.ECS.Game_Player_triggerButtonAction =
    Game_Player.prototype.triggerButtonAction;
Game_Player.prototype.triggerButtonAction = function() {
    var value = Yanfly.ECS.Game_Player_triggerButtonAction.call(this);
    if (value) this.setStealthMode(false);
    return value;
};

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-event-chase-stealth-help-with-conditional-branch.118566/