I used Buffs & States Core (YEP) to create a state that changes a skill when given a certain state.
note tag for state: 223
<Custom Action Start Effect>
if (target.Actorid === 1) {
BattleManager.queueForceAction (target, 10, -2);
} else if (target.Actorid === 2) {
BattleManager.queueForceAction (target, 13, -2);
}
user.removeState (223);
</ Custom Action Start Effect>
But this doesn't work.
The problem is that I want to change the skill depending on who is the target when this is granted to the enemy.
For example:
If the enemy's attack target is actor ID [1], perform skill ID 10
If the enemy's attack target is actor ID [2], perform skill ID 13
I would like to be able to do this within the code of the <Custom Action Start Effect>.
I found a bit closer to this in YEP Tips & Tricks.
)
Here is the code to check if the current action is a friend.
if (action && action.isItem () && action.isForFriend ()) {
I want to confirm this by the target actor id
I changed the "action.isForFriend ()" part to "action.isActorid === 1", but nothing changed.
Please help if anyone knows how to do this!
note tag for state: 223
<Custom Action Start Effect>
if (target.Actorid === 1) {
BattleManager.queueForceAction (target, 10, -2);
} else if (target.Actorid === 2) {
BattleManager.queueForceAction (target, 13, -2);
}
user.removeState (223);
</ Custom Action Start Effect>
But this doesn't work.
The problem is that I want to change the skill depending on who is the target when this is granted to the enemy.
For example:
If the enemy's attack target is actor ID [1], perform skill ID 10
If the enemy's attack target is actor ID [2], perform skill ID 13
I would like to be able to do this within the code of the <Custom Action Start Effect>.
I found a bit closer to this in YEP Tips & Tricks.
)
Here is the code to check if the current action is a friend.
if (action && action.isItem () && action.isForFriend ()) {
I want to confirm this by the target actor id
I changed the "action.isForFriend ()" part to "action.isActorid === 1", but nothing changed.
Please help if anyone knows how to do this!