Hey all,
I'm trying to get my characters to face the enemy they're attacking. Generally this isn't a problem unless they're attacking an ally. In a 3 person team, if actor 1 (top character) attacks actor 3 (bottom character), he'll step out to actor 3 and turn to face them before attacking. If actor 1 attacks actor 2 (middle character), he'll step out to actor 2, but face away from them for the attack. I have a similar issue with the enemies, but it seems that they won't face their target (if it's an ally of theirs) at all, they just step out, swing, step back. When anyone targets an enemy, there are no issues, this only affects attacks on allies.
I have 2 attack skills - one for the actors, one for the enemies:
For the actors to use (skill 1):
And for the enemies to use (skill 25):
The enemy attack skill is called in the notetags for Yanfly's AI Core if it matters.
I'm trying to get my characters to face the enemy they're attacking. Generally this isn't a problem unless they're attacking an ally. In a 3 person team, if actor 1 (top character) attacks actor 3 (bottom character), he'll step out to actor 3 and turn to face them before attacking. If actor 1 attacks actor 2 (middle character), he'll step out to actor 2, but face away from them for the attack. I have a similar issue with the enemies, but it seems that they won't face their target (if it's an ally of theirs) at all, they just step out, swing, step back. When anyone targets an enemy, there are no issues, this only affects attacks on allies.
I have 2 attack skills - one for the actors, one for the enemies:
For the actors to use (skill 1):
<setup action>
display action
immortal: targets, true
if user.isActor() == true && user.attackMotion() != 'missile'
motion walk: user
move user: targets, front, 30
wait for movement
end
if user.isActor() == true && user.attackMotion() == 'missile'
perform start
wait for movement
end
if user.isActor() != true
enemy effect: user, whiten
end
</setup action>
<target action>
if user.isActor() == true
motion attack: user
wait: 10
attack animation: target
wait for animation
else
wait: 10
attack animation: target
wait for animation
end
action effect
if target.isActor() !== true
enemy effect: target, blink
end
wait: 10
</target action>
<finish action>
clear battle log
immortal: targets, false
if user.isActor() == true && user.attackMotion() !== 'missile'
face user: home
motion walk: user
move user: home, 20
wait for movement
end
perform finish
wait for movement
</finish action>
<Select Conditions>
Not State: 13
</Select Conditions>
display action
immortal: targets, true
if user.isActor() == true && user.attackMotion() != 'missile'
motion walk: user
move user: targets, front, 30
wait for movement
end
if user.isActor() == true && user.attackMotion() == 'missile'
perform start
wait for movement
end
if user.isActor() != true
enemy effect: user, whiten
end
</setup action>
<target action>
if user.isActor() == true
motion attack: user
wait: 10
attack animation: target
wait for animation
else
wait: 10
attack animation: target
wait for animation
end
action effect
if target.isActor() !== true
enemy effect: target, blink
end
wait: 10
</target action>
<finish action>
clear battle log
immortal: targets, false
if user.isActor() == true && user.attackMotion() !== 'missile'
face user: home
motion walk: user
move user: home, 20
wait for movement
end
perform finish
wait for movement
</finish action>
<Select Conditions>
Not State: 13
</Select Conditions>
And for the enemies to use (skill 25):
<target action>
wait for movement
if user.attackMotion() !== 'missile'
move user: target, front base, 20
wait for movement
end
motion attack: user
motion wait: user
action animation: target
action effect: target
death break
wait: 30
</target action>
wait for movement
if user.attackMotion() !== 'missile'
move user: target, front base, 20
wait for movement
end
motion attack: user
motion wait: user
action animation: target
action effect: target
death break
wait: 30
</target action>
The enemy attack skill is called in the notetags for Yanfly's AI Core if it matters.