Reapplying prior state to a target.

ok, i thought from the first post that it should have been able to work if multiple states were applied. its a quick adjustment then.

Code:
<JS On Erase State>
user._pastState = state.id;
</JS On Erase State>

<JS Post-Apply>
if (target._pastState)
  target.addState(target._pastState);
</JS Post-Apply>
This is perfect, works flawlessly, thanks a lot once again!
ok, i thought from the first post that it should have been able to work if multiple states were applied. its a quick adjustment then.

Code:
<JS On Erase State>
user._pastState = state.id;
</JS On Erase State>

<JS Post-Apply>
if (target._pastState)
  target.addState(target._pastState);
</JS Post-Apply>
Would that apply for adding a new state too?

Example:

<JS On Erase State>
"give user state.id(11)" [havent figured out how to give user state]
<JS On Erase State>
[havent figured out how to give user state]
The addState() function is in the code you quoted.

Also, your notetag wouldn't work because you don't close it correctly.

@whiteswords12, 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.

If you need help please make your own thread with details about your problem.

Original thread: https://forums.rpgmakerweb.com/threads/reapplying-prior-state-to-a-target.172142/