MV YEP Buffs & States / Auto Passives / ActSeq

Hi all,

Trying to be a bit sneaky and use a self-referencing flag to be the condition of a passive state, so that the passive state can be removed once the flag is activated on the user.

One complication is that I want to make the flag true in a skill, so I'm trying to figure out how to do this.

For instance, let's say the condition on the passive state is:
Code:
  <Custom Passive Condition>
  if (!user._stateFlag) {
    condition = true;
  } else {
    condition = false;
  }
  </Custom Passive Condition>

How would I then make this flag true in an action sequence?

I've tried both of these:

Code:
Eval: user._stateFlag = true;
Code:
Eval: BattleManager._subject._stateFlag = true;

But neither is working.

Thanks!
First question: What are you actually trying to accomplish? This smells like an A->B problem to me.

Second to help you with your current question:
Is there any console output maybe indicating a syntax error? (You can view the console via F8)
Passive conditions do not automatically apply a state when they are fulfilled. The state must still be applied normally through notetags or the plugin parameters. Only if it would be applied already is the condition checked to see if it actually should apply.
How would I then make this flag true in an action sequence?

Code:
Eval: user._stateFlag = true;
That is correct.
Code:
  <Custom Passive Condition>
  if (!user._stateFlag) {
    condition = true;
  } else {
    condition = false;
  }
  </Custom Passive Condition>
This looks backwards, you're activating the passive state if the user's flag is not true. For typical purposes, you would want the state active when the flag is true, and off when it's falsy (false/undefined). So you'd do:
Code:
<Custom Passive Condition>
condition=user._stateFlag;
</Custom Passive Condition>

Edit: I just read more carefully that that is what you want in your original post. So everything you put should work, code-wise - double check that the passive is actually being applied to the actor in some way via correct notetags, and that your action sequence is running.
@ATT_Turan thank you! Yes, you've got everything right, so I'll back and check that something else isn't the problem. Awesome, thanks!

Original thread: https://forums.rpgmakerweb.com/threads/yep-buffs-states-auto-passives-actseq.149606/