I Edited my post, because I've found more about what's going on.
I'm making a game with an evented button action command system. I want the skill to activate the common event for the button action command, then afterwards, deal damage depending on whether or not the player was successful. I'm using both the YEP_X_ActSeqPack1 and YEP_SkillCore along with their required plugins. I used this in a note tag:
Skill #1 will be used when you select
the Attack command.
<Before Eval>
console.log("Before Eval");
if ($gameSwitches.value(9)) {
console.log("Switch 9");
if (target.isEnemy()) {
console.log("Targeting Enemy");
value *= 2
} else {
console.log("Targeting Ally");
value /= 2
}
}
</Before Eval>
<whole action>
common event: 10
</whole action>
I'm want the skill core to test whether the switch 9 is on and if so, change the damage value, but I seem to be doing it wrong. The common event isn't running, and if I use the debug to set switch 9 on before the battle starts, the console log shows that the switch is on and that an enemy or ally is being targeted, but the "value *= 2" and "value /= 2" parts aren't working.
I'm making a game with an evented button action command system. I want the skill to activate the common event for the button action command, then afterwards, deal damage depending on whether or not the player was successful. I'm using both the YEP_X_ActSeqPack1 and YEP_SkillCore along with their required plugins. I used this in a note tag:
Skill #1 will be used when you select
the Attack command.
<Before Eval>
console.log("Before Eval");
if ($gameSwitches.value(9)) {
console.log("Switch 9");
if (target.isEnemy()) {
console.log("Targeting Enemy");
value *= 2
} else {
console.log("Targeting Ally");
value /= 2
}
}
</Before Eval>
<whole action>
common event: 10
</whole action>
I'm want the skill core to test whether the switch 9 is on and if so, change the damage value, but I seem to be doing it wrong. The common event isn't running, and if I use the debug to set switch 9 on before the battle starts, the console log shows that the switch is on and that an enemy or ally is being targeted, but the "value *= 2" and "value /= 2" parts aren't working.
If someone has another way I can go about doing this, that would be fine too. I basically want to be able to make up different button action commands using common events (that run before the damage calculation), then have the result affect the skill.
