tl;dr: What script do I need to write into a Conditional Branch in an Action Sequence to have it detect if the user of the skill is affected by a state?
------------------------
So I'm currently working on a skill that toggles a state. Let's call this state Tank Stance. The skill uses an Visustella Action Sequence to check if the actor already has Tank Stance applied and toggles it: if they have that state, the Sequence removes the state, if they don't it applies the state. This behavior works resulting in a toggleable state that buffs the actor it is applied to.
However, with the way things currently work, I have to create a unique Action Sequence and respective skill for each character that I want to have this kind of behavior. ie: Actor A and Actor B both have unique skills, sequences and states that do the exact same thing. Actor B can't use Actor A's skill because it will check if Actor A has the state before applying, not Actor B.
I know that Conditional Branches have an option for a scripted condition, and there is code to check if an actor is affected by a state. However, my skills with Javascript are practically null, so what would I need to write for script to have the conditional branch check for the user of the skill that triggers the Action Sequence? The mechanical commands in action sequences have an option for detecting the user of a skill, so that won't be an issue for me.
------------------------
So I'm currently working on a skill that toggles a state. Let's call this state Tank Stance. The skill uses an Visustella Action Sequence to check if the actor already has Tank Stance applied and toggles it: if they have that state, the Sequence removes the state, if they don't it applies the state. This behavior works resulting in a toggleable state that buffs the actor it is applied to.
However, with the way things currently work, I have to create a unique Action Sequence and respective skill for each character that I want to have this kind of behavior. ie: Actor A and Actor B both have unique skills, sequences and states that do the exact same thing. Actor B can't use Actor A's skill because it will check if Actor A has the state before applying, not Actor B.
I know that Conditional Branches have an option for a scripted condition, and there is code to check if an actor is affected by a state. However, my skills with Javascript are practically null, so what would I need to write for script to have the conditional branch check for the user of the skill that triggers the Action Sequence? The mechanical commands in action sequences have an option for detecting the user of a skill, so that won't be an issue for me.