Hi folks,
I'm using VisuStella Battle Core and all of the various states/skills/ActionSeq plugins for context, though this isn't a plugin support request.
I'm running a common event as part of each skill in my game, and need that event to include a conditional branch which checks the state of the target enemy.
I am trying to add a conditional branch which checks if the target has a particular state (in this case, the Guard state), and if so, it skips all of the other commands, instead displaying a "they blocked your attack!" message and then removing the guard state.
What my problem boils down to is needing a way to check via script call whether the current target enemy has a particular state or not.
I've seen "target.isStateAffected(2)" thrown around, however this doesn't seem to work at all for me. I often see it referenced in writing JS for custom action sequences using the VS plugins, but I need something that works in a typical conditional branch of a common event.
I currently have this in my event:
The idea is that it would check if my current target has state 2, and do stuff depending on that. In testing however, even though my target definitely has the state, this never returns true.
Am I doing something wrong here?
I'm open to any ways to check a current target's state from a common event. I'm hoping there's some convoluted way to get this info by setting variables or something, or maybe some script call I don't know about.
Bonus request:
I also have no idea how to clear a specific state from the target enemy (I'd like to remove the guard state from them after doing this skip).
I'm using VisuStella Battle Core and all of the various states/skills/ActionSeq plugins for context, though this isn't a plugin support request.
I'm running a common event as part of each skill in my game, and need that event to include a conditional branch which checks the state of the target enemy.
I am trying to add a conditional branch which checks if the target has a particular state (in this case, the Guard state), and if so, it skips all of the other commands, instead displaying a "they blocked your attack!" message and then removing the guard state.
What my problem boils down to is needing a way to check via script call whether the current target enemy has a particular state or not.
I've seen "target.isStateAffected(2)" thrown around, however this doesn't seem to work at all for me. I often see it referenced in writing JS for custom action sequences using the VS plugins, but I need something that works in a typical conditional branch of a common event.
I currently have this in my event:
The idea is that it would check if my current target has state 2, and do stuff depending on that. In testing however, even though my target definitely has the state, this never returns true.
Am I doing something wrong here?
I'm open to any ways to check a current target's state from a common event. I'm hoping there's some convoluted way to get this info by setting variables or something, or maybe some script call I don't know about.
Bonus request:
I also have no idea how to clear a specific state from the target enemy (I'd like to remove the guard state from them after doing this skip).