Adding a state to a TP Mode (In a Yanfly script)

Hi,

For my project I am using Yanfly's TP Manager (https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/tp-manager/).   I love it, however I would like to be able to add states to actors when they are using a specific TP Mode.

I am not sure if this is ridiculously simple (a way to do it that I'm overlooking?) or ridiculously hard (since it's someone else's code), but any help would be greatly appreciated. Thank you!
I assume that you mean states with a specific function, because nothin gin the TP-Manager prevents you from using states on any actor.


So you have to explain to us in more detail what you want to do, because nothing prevents you from adding regular states to the actors whenever you want.
Oh! Sorry I'm quite a programming newb.  I want it so that if an actor equips TP Mode 1, he also receives say State X, and then when he unequips it or switches to TP Mode 2, State X is removed and State Y is added, etc..

I can just add a line add_state(x) anywhere in a specific TP Mode section of the code, and that will add the state for an actor who equips that mode?   Do I need to prefix it as a.add_state or user.add_state  ? 

and just to make sure, this would also remove the state when that mode was unequipped?

Original thread: https://forums.rpgmakerweb.com/threads/adding-a-state-to-a-tp-mode-in-a-yanfly-script.36925/