Hello everyone,
im using VisuStella Battle Core and i wanted to include more damage mechanics in the common events related to every skill. Within a common event that is connceted to an enemy skill, i want to check is Switch 43 is true or not. For this i'd like to check if the target (an actor) hat a specific state (ID 39) and if yes, change Switch 43 to "on" before the damage appears. Im unsure if the enemy battler can even find a (single-)target out of my actors group during the "Pre-Apply" phase. Currently, the switch stays off no matter what and im looking for solutions.
This is the notetag of the skill.
im using VisuStella Battle Core and i wanted to include more damage mechanics in the common events related to every skill. Within a common event that is connceted to an enemy skill, i want to check is Switch 43 is true or not. For this i'd like to check if the target (an actor) hat a specific state (ID 39) and if yes, change Switch 43 to "on" before the damage appears. Im unsure if the enemy battler can even find a (single-)target out of my actors group during the "Pre-Apply" phase. Currently, the switch stays off no matter what and im looking for solutions.
This is the notetag of the skill.
Code:
<Custom Action Sequence>
<JS Pre-Apply>
if (target.isStateAffected(39)) {
$gameSwitches.setValue(43, true);
} else {
$gameSwitches.setValue(43, false);
}
</JS Pre-Apply>

